### Question:
UserLookupService extends UserPrincipalLookupService { public UserLookupService(boolean supportsGroups) { this.supportsGroups = supportsGroups; } UserLookupService(boolean supportsGroups); @Override UserPrincipal lookupPrincipalByName(String name); @Override GroupPrincipal lookupPrincipalByGroupName(String group);  }### Answer:
@Test public void testUserLookupService() throws IOException { UserPrincipalLookupService service = new UserLookupService(true); UserPrincipal bob1 = service.lookupPrincipalByName("bob"); UserPrincipal bob2 = service.lookupPrincipalByName("bob"); UserPrincipal alice = service.lookupPrincipalByName("alice"); assertThat(bob1).isEqualTo(bob2); assertThat(bob1).isNotEqualTo(alice); GroupPrincipal group1 = service.lookupPrincipalByGroupName("group"); GroupPrincipal group2 = service.lookupPrincipalByGroupName("group"); GroupPrincipal foo = service.lookupPrincipalByGroupName("foo"); assertThat(group1).isEqualTo(group2); assertThat(group1).isNotEqualTo(foo); }