### Question:
JpaGroupRepository implements GroupRepository { @Override public Group findByTitle(String title) { TypedQuery<JpaGroup> query = manager.createNamedQuery(JpaGroup.FIND_BY_TITLE, JpaGroup.class); query.setParameter(JpaGroup.GROUP_TITLE_PARAM, title); return getSingleResult(query.getResultList()); }  @Override Class<? extends Group> getType(); @Override Group get(String id); @Override List<Group> getAll(); @Override List<Group> getLimitedList(int offset, int limit); @Override int getCountAll(); @Override Group save(Group item); @Override void delete(Group item); @Override Group findByTitle(String title);  }### Answer:
@Test public void findByTitle() { Group group = repository.findByTitle(GROUP_TITLE); assertThat(group, notNullValue()); assertThat(group.getTitle(), equalTo(GROUP_TITLE)); assertThat(group.getId(), equalTo(GROUP_ID)); }
@Test public void findByTitle_Invalid() { Group group = repository.findByTitle(INVALID_GROUP_TITLE); assertThat(group, nullValue()); }