### Question:
AbstractProfileManager implements ProfileManager { @Override public Profile getProfile(final String id) { return null != id ? getAllProfiles().stream().filter(profile -> profile.getProfileId().equals(id)).findFirst().orElse(null) : null; }  @Override Collection<Profile> getAllProfiles(); @Override Profile getProfile(final String id); @Override Collection<Profile> getProfiles(final String definitionSetId); @Override Profile getProfile(final String definitionSetId,
                              final String id);  }### Answer:
@Test public void testGetProfileById() { assertEquals(defaultProfile, tested.getProfile(PROFILE_DEFAULT_ID)); assertEquals(domainProfile, tested.getProfile(PROFILE_DOMAIN_ID)); assertNull(tested.getProfile("someOtherId")); }
@Test public void testGetProfileByDomainAndId() { assertEquals(defaultProfile, tested.getProfile(DEF_SET_ID, PROFILE_DEFAULT_ID)); assertEquals(domainProfile, tested.getProfile(DEF_SET_ID, PROFILE_DOMAIN_ID)); }