diff --git a/java/org/servalproject/servaldna/keyring/KeyringIdentityList.java b/java/org/servalproject/servaldna/keyring/KeyringIdentityList.java index e9c54b40..ea26f5f7 100644 --- a/java/org/servalproject/servaldna/keyring/KeyringIdentityList.java +++ b/java/org/servalproject/servaldna/keyring/KeyringIdentityList.java @@ -29,6 +29,8 @@ import org.servalproject.servaldna.SubscriberId; import java.io.IOException; import java.net.HttpURLConnection; +import java.util.ArrayList; +import java.util.List; import java.util.Vector; import java.util.Map; @@ -80,6 +82,25 @@ public class KeyringIdentityList { } } + public static List getTestIdentities() { + try { + List ret = new ArrayList<>(); + byte[] sid = new byte[SubscriberId.BINARY_SIZE]; + + for (int i = 0; i < 10; i++) { + sid[0]=(byte)i; + ret.add(new KeyringIdentity( + i, + new SubscriberId(sid), + "555000" + i, + "Agent " + i)); + } + return ret; + }catch (Exception e){ + throw new IllegalStateException(e); + } + } + public KeyringIdentity nextIdentity() throws ServalDInterfaceException, IOException { try {