GroupDAO { public Optional<Group> getGroupById(long id) { GroupsRecord r = dslContext.fetchOne(GROUPS, GROUPS.ID.eq(id)); return Optional.ofNullable(r).map(groupMapper::map); } private  GroupDAO(DSLContext dslContext, GroupMapper groupMapper, ObjectMapper mapper); long createGroup(String name, String creator, String description, ImmutableMap<String, String> metadata); void deleteGroup(Group group); Optional<Group> getGroup(String name); Optional<Group> getGroupById(long id); ImmutableSet<Group> getGroups();  }
@Test public void getGroupById() { assertThat(groupDAO.getGroupById(group1.getId())).contains(group1); }