### Question:
JpaGroupConverter implements ModelConverter<Group, JpaGroup> { @Override public JpaGroup convert(Group source) { return source instanceof JpaGroup ? (JpaGroup) source : createEntity(source); }  @Override Class<Group> getSourceType(); @Override JpaGroup convert(Group source);  }### Answer:
@Test public void testNoConversion() { JpaGroup group = new JpaGroup(); assertThat(converter.convert(group), is(sameInstance(group))); }
@Test public void nullConversion() { Group category = null; assertThat(converter.convert(category), is(nullValue())); }
@Test public void testConvertGroupToJpaGroup() { JpaGroup jpaGroup = converter.convert(group); assertThat(jpaGroup, is(not(sameInstance(group)))); assertThat(jpaGroup, is(instanceOf(JpaGroup.class))); assertEquals(description, jpaGroup.getDescription()); assertEquals(title, jpaGroup.getTitle()); assertEquals(ownerId, jpaGroup.getOwnerId()); assertEquals(members.size(), jpaGroup.getMemberIds().size()); }