### Question:
Contender { public void setName(String name) { this.name = name; } Contender(Game game, String name);  Contender(); Long getScore(); void setScore(Long score); Long getId(); void setId(Long id); String getName(); void setName(String name); Game getGame(); void setGame(Game game); Set<QuestionAnswer> getQuestionAndAnswers(); void setQuestionAndAnswers(Set<QuestionAnswer> questionAndAnswers); Contender incrementScore();  }### Answer:
@Test public void givenAContenderIsSavedInTheDatabase_whenCallingFindById_thenTheContenderIsReturned() { Contender contender1 = new Contender(); contender1.setName("name"); testEntityManager.persist(contender1); testEntityManager.flush(); Contender contender2 = contenderRepository.findById(1L).orElse(null); assertEquals(contender1, contender2); }