DuoShibboleth { public static DuoShibboleth instance(String ikey, String skey, String akey, String host, String username) { if (ikey == null) { throw new IllegalArgumentException("Null value not allowed for ikey"); } if (skey == null) { throw new IllegalArgumentException("Null value not allowed for skey"); } if (akey == null) { throw new IllegalArgumentException("Null value not allowed for akey"); } if (host == null) { throw new IllegalArgumentException("Null value not allowed for host"); } if (username == null) { throw new IllegalArgumentException("Null value not allowed for username"); } return new DuoShibboleth(ikey.trim(), skey.trim(), akey.trim(), host.trim(), username); } private  DuoShibboleth(); private  DuoShibboleth(String ikey, String skey, String akey, String host, String username); static DuoShibboleth instance(String ikey, String skey, String akey, String host, String username); String performPreauth(String failmode); String signRequest(); boolean verifyResponseEqualsUsername(String duoResponse);  }
@Test public void testNotSingleton() { DuoShibboleth otherDuoShibboleth = DuoShibboleth.instance("DIXXXXXXXXXXXXXXXXXX", "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef", "useacustomerprovidedapplicationsecretkey", "fakeurl", "testuser"); assertFalse(duoShibboleth==otherDuoShibboleth); }