@Test
  public void testProduceReturnsOutputWithGenerationGap2() {
    // Given:
    String pojoClassname = testdata.generationgap.Order.class.getName();

    TypeElement pojoTypeElement = elements.getTypeElement(pojoClassname);

    // When:
    Output output = underTest.produce(new Input(pojoTypeElement));
    BuilderM builder = output.getBuilder();
    ManualBuilderM manualBuilder = output.getManualBuilder();

    // Then:
    assertEquals("type", TypeM.get("testdata.generationgap.OrderBuilder"), manualBuilder.getType());
    assertEquals(
        "type.generic",
        "OrderBuilder<T extends Object>",
        manualBuilder.getType().getGenericTypeSimpleNameWithBounds());
    assertEquals(
        "superType",
        TypeM.get("testdata.generationgap.AbstractOrderBuilder"),
        manualBuilder.getSuperType());
    assertEquals(
        "type", TypeM.get("testdata.generationgap.AbstractOrderBuilder"), builder.getType());
    assertEquals(
        "type.generic",
        "AbstractOrderBuilder<T extends Object>",
        builder.getType().getGenericTypeSimpleNameWithBounds());
    assertEquals("superType", TypeM.get(Object.class.getName()), builder.getSuperType());
  }
  @Test
  public void testProduceReturnsBuilderWithCorrectProperties() {
    // Given:
    String pojoClassname = Contact.class.getName();
    TypeElement pojoType = elements.getTypeElement(pojoClassname);

    // When:
    Output output = underTest.produce(new Input(pojoType));
    BuilderM builder = output.getBuilder();

    // Then:
    assertEquals("size", 3, builder.getProperties().size());
    assertThat(builder.getProperties(), containsPropertyWithName("surname"));
    assertThat(builder.getProperties(), containsPropertyWithName("firstname"));
    assertThat(builder.getProperties(), containsPropertyWithName("email"));

    PropertyM p0 = getFirstPropertyByName(builder.getProperties(), "surname");
    assertEquals("type of surname", "java.lang.String", p0.getType().getQualifiedName());
    PropertyM p1 = getFirstPropertyByName(builder.getProperties(), "firstname");
    assertEquals("type of firstname", "java.lang.String", p1.getType().getQualifiedName());
    PropertyM p2 = getFirstPropertyByName(builder.getProperties(), "email");
    assertEquals("type of email", "java.lang.String", p2.getType().getQualifiedName());

    assertEquals("selfType", BUILDER, builder.getSelfType().getSimpleName());

    Collection<PropertyM> setterProps = builder.getPropertiesForSetters();
    assertEquals("size of properties to set", 0, setterProps.size());

    Collection<PropertyM> assignProps = builder.getPropertiesForAssignment();
    assertEquals("size of properties to assign", 2, assignProps.size());
  }
  @Test
  public void testBuilderPackage() {
    // Given:
    TypeElement pojoTypeElement = env.getElementUtils().getTypeElement(ADDRESS_DTO_CLASSNAME);

    // When:
    Output output = underTest.produce(new Input(pojoTypeElement));
    BuilderM builder = output.getBuilder();

    // Then:
    assertEquals("builder classname", "AddressDTOBuilder", builder.getType().getSimpleName());
    assertEquals("package", "testdata.builder", builder.getType().getPackage());
  }
  @Test
  public void testProduceReturnsBuilderWithCorrectSelfType() {
    // Given:
    String pojoClassname = Contact.class.getName();
    TypeElement pojoType = elements.getTypeElement(pojoClassname);

    // When:
    Output output = underTest.produce(new Input(pojoType));
    BuilderM builder = output.getBuilder();

    // Then:
    assertEquals("selfType", BUILDER, builder.getSelfType().getSimpleName());
  }
  @Test
  public void testProduceModelReturnsModelWithTypeParameters() {
    // Given:
    String pojoClassname = NumberGrid.class.getName();
    TypeElement pojoTypeElement = env.getElementUtils().getTypeElement(pojoClassname);

    // When:
    Output output = underTest.produce(new Input(pojoTypeElement));
    BuilderM builder = output.getBuilder();

    // Then:
    assertEquals(
        "type",
        "NumberGridBuilder<E extends Number>",
        builder.getType().getGenericTypeSimpleNameWithBounds());
  }
  @Test
  public void testProduceReturnsOutputWithGenerationGap1() {
    // Given:
    String pojoClassname = testdata.generationgap.Contact.class.getName();

    TypeElement pojoTypeElement = elements.getTypeElement(pojoClassname);

    // When:
    Output output = underTest.produce(new Input(pojoTypeElement));
    BuilderM builder = output.getBuilder();
    ManualBuilderM manualBuilder = output.getManualBuilder();

    // Then:
    assertEquals(
        "type", TypeM.get("testdata.generationgap.ContactBuilder"), manualBuilder.getType());
    assertEquals(
        "superType",
        TypeM.get("testdata.generationgap.AbstractContactBuilder"),
        manualBuilder.getSuperType());
    assertEquals(
        "type", TypeM.get("testdata.generationgap.AbstractContactBuilder"), builder.getType());
    assertEquals("superType", TypeM.get(Object.class.getName()), builder.getSuperType());
  }