AccessVerifyConnectionSpec implements ConnectionSpec { public String getCredentials() { return getAccessCode() + ACCESS_VERIFY_CODE_DELIMITER + getVerifyCode(); } AccessVerifyConnectionSpec(String division, final String accessCode, final String verifyCode, String clientAddress, String clientHostName); String getClientAddress(); String getClientHostName(); String getDivision(); String getAccessCode(); String getVerifyCode(); String getCredentials(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final String DIVISION_CREDENTIALS_DELIMITER; static final String ACCESS_VERIFY_CODE_DELIMITER; }
@Test public void testGetCredentials() { AccessVerifyConnectionSpec av = new AccessVerifyConnectionSpec("960", "foo", "bar", "123.45.67.89", "www.example.org"); assertEquals("foo;bar", av.getCredentials()); }