### Question:
PropertiesBasedIdentityResolver implements IdentityResolver { @Override public UUID resolveOrganizationUUID(OrganizationIdentity identity) { if (!(identity instanceof OrganizationIdentifier)) { throw new IllegalArgumentException("Cannot handle the type of provided identity."); } return OrganizationIdentifier.class.cast(identity).getGlobalID(); }  @Override FunctionIdentity resolveFunctionIdentity(String name); @Override OrganizationIdentity resolveOrganizationIdentity(UUID id); @Override UUID resolveOrganizationUUID(OrganizationIdentity identity); @Override SubjectIdentity resolveSubjectIdentity(UUID id); @Override UUID resolveSubjectUUID(SubjectIdentity identity); @Override UUID resolveSubjectUUID(SessionDescriptor descriptor);  }### Answer:
@Test public void testResolveOrganizationUUID() { UUID id = UUID.fromString("00000000-0000-0000-0000-000000000001"); OrganizationIdentity identity = OrganizationIdentifier.builder().setGlobalID(id).build(); assertEquals(id, resolver.resolveOrganizationUUID(identity)); }
@Test(expected = IllegalArgumentException.class) public void testResolveOrganizationUuidWithWrongIdentityType() { resolver.resolveOrganizationUUID(new OrganizationIdentity() {}); }