### Question:
JpaPageTemplateRegionConverter implements ModelConverter<PageTemplateRegion, JpaPageTemplateRegion> { @Override public JpaPageTemplateRegion convert(PageTemplateRegion source) { return source instanceof JpaPageTemplateRegion ? (JpaPageTemplateRegion) source : createEntity(source); }  @Override Class<PageTemplateRegion> getSourceType(); @Override JpaPageTemplateRegion convert(PageTemplateRegion source);  }### Answer:
@Test public void testNoConversion() { JpaPageTemplateRegion template = new JpaPageTemplateRegion(); assertThat(converter.convert(template), is(sameInstance(template))); }
@Test public void nullConversion() { PageTemplateRegion template = null; assertThat(converter.convert(template), is(nullValue())); }
@Test public void convertValid() { PageTemplateRegion template = new PageTemplateRegionImpl("1"); template.setRenderSequence(1); template.setPageTemplateWidgets(new ArrayList<PageTemplateWidget>()); template.setPageTemplate(new PageTemplateImpl("1")); template.setLocked(true); JpaPageTemplateRegion jpaTemplate = converter.convert(template); assertThat(jpaTemplate, is(not(sameInstance(template)))); assertThat(jpaTemplate, is(instanceOf(JpaPageTemplateRegion.class))); assertThat(jpaTemplate.getRenderSequence(), is(equalTo(template.getRenderSequence()))); assertThat(jpaTemplate.getPageTemplate(), is(instanceOf(JpaPageTemplate.class))); assertThat(jpaTemplate.getPageTemplateWidgets(), is(equalTo(template.getPageTemplateWidgets()))); assertThat(jpaTemplate.isLocked(), is(equalTo(template.isLocked()))); }