### Question:
PreferencesRepository { public Optional<PlayerPreferences> findBy(Specification specification) { return specification.append(ebeanServer.find(PlayerPreferences.class)).findOneOrEmpty(); }  Optional<PlayerPreferences> findBy(Specification specification); void update(PlayerPreferences playerPreferences);  }### Answer:
@Test public void whenFindByParentProfile() { PlayerProfile profile = new PlayerProfile( UUID.randomUUID(), "name" ); ebean.save(profile); final Optional<PlayerPreferences> optionalResult = repository.findBy( new PlayerNameSpecification("name") ); assertTrue(optionalResult.isPresent()); assertEquals(profile.getPlayerPreferences(), optionalResult.get()); }