@Test
public void findStructureByDefOfExisting_should_returnStructure() {

    final DataType integer = DataType.INTEGER;
    final FieldDef origin = Daleq.fd(integer).name("propertyDef");
    final FieldType fieldType = new FieldTypeImpl(
            "P NAME",
            integer,
            Optional.<TemplateValue>of(new StringTemplateValue("bar")),
            origin
    );
    final TableType table =
            new TableTypeImpl("SOME_NAME",
                    fieldType);
    assertThat(table.findFieldBy(origin), is(fieldType));
}