@Test public void verifyEqualsWithFalse() throws Exception { final HttpBasedServiceCredential c = new HttpBasedServiceCredential( new URL("http://www.cnn.com"), CoreAuthenticationTestUtils.getRegisteredService("https://some.app.edu")); final HttpBasedServiceCredential c2 = new HttpBasedServiceCredential( new URL("http://www.msn.com"), CoreAuthenticationTestUtils.getRegisteredService("https://some.app.edu")); assertFalse(c.equals(c2)); assertFalse(c.equals(new Object())); }
@Test public void verifyEqualsWithNull() throws Exception { final HttpBasedServiceCredential c = new HttpBasedServiceCredential( new URL("http://www.cnn.com"), CoreAuthenticationTestUtils.getRegisteredService("https://some.app.edu")); assertNotEquals(c, null); }