@Test void testGetEntityType() { EntityType expectedEntityType = entityTypeFactory.create("EntityNameSmall"); expectedEntityType.addAttribute(vcfAttrs.getChromAttribute()); expectedEntityType.addAttribute(vcfAttrs.getAltAttribute()); expectedEntityType.addAttribute(vcfAttrs.getPosAttribute()); expectedEntityType.addAttribute(vcfAttrs.getRefAttribute()); expectedEntityType.addAttribute(vcfAttrs.getFilterAttribute()); expectedEntityType.addAttribute(vcfAttrs.getQualAttribute()); expectedEntityType.addAttribute(vcfAttrs.getIdAttribute()); Attribute internalIdMeta = attrMetaFactory.create().setName(INTERNAL_ID).setDataType(STRING); expectedEntityType.addAttribute(internalIdMeta, ROLE_ID); Attribute infoMetaData = attrMetaFactory.create().setName(INFO).setDataType(COMPOUND).setNillable(true); Attribute infoNS = attrMetaFactory .create() .setName("NS") .setDataType(INT) .setDescription("Number of Samples With Data") .setAggregatable(true) .setParent(infoMetaData); Attribute infoDF = attrMetaFactory .create() .setName("DF") .setDataType(BOOL) .setDescription("Flag field") .setAggregatable(true) .setParent(infoMetaData); Attribute infoDF2 = attrMetaFactory .create() .setName("DF2") .setDataType(BOOL) .setDescription("Flag field 2") .setAggregatable(true) .setParent(infoMetaData); Attribute infoChar2 = attrMetaFactory .create() .setName("CHAR") .setDataType(STRING) .setDescription("char field") .setAggregatable(true) .setParent(infoMetaData); expectedEntityType.addAttribute(infoNS); expectedEntityType.addAttribute(infoDF); expectedEntityType.addAttribute(infoDF2); expectedEntityType.addAttribute(infoChar2); expectedEntityType.addAttribute(infoMetaData); EntityType actualEntityType = vcfToEntitySmall.getEntityType(); String backend = "test"; expectedEntityType.setBackend(backend); actualEntityType.setBackend(backend); Package package_ = mock(Package.class); when(package_.getIdValue()).thenReturn("pck0"); expectedEntityType.setPackage(package_); actualEntityType.setPackage(package_); expectedEntityType.setId("dummyId"); expectedEntityType.setLabel("EntityNameSmall"); expectedEntityType.getOwnAllAttributes().forEach(attr -> attr.setIdentifier(null)); actualEntityType.setId("dummyId"); actualEntityType.getOwnAllAttributes().forEach(attr -> attr.setIdentifier(null)); assertTrue(EntityUtils.equals(expectedEntityType, actualEntityType)); }
public EntityType getEntityType() { return entityType; }
VcfToEntity { public EntityType getEntityType() { return entityType; } }
VcfToEntity { public EntityType getEntityType() { return entityType; } VcfToEntity(
      String entityTypeId,
      VcfMeta vcfMeta,
      VcfAttributes vcfAttributes,
      EntityTypeFactory entityTypeFactory,
      AttributeFactory attrMetaFactory); }
VcfToEntity { public EntityType getEntityType() { return entityType; } VcfToEntity(
      String entityTypeId,
      VcfMeta vcfMeta,
      VcfAttributes vcfAttributes,
      EntityTypeFactory entityTypeFactory,
      AttributeFactory attrMetaFactory); Entity toEntity(VcfRecord vcfRecord); EntityType getEntityType(); }
VcfToEntity { public EntityType getEntityType() { return entityType; } VcfToEntity(
      String entityTypeId,
      VcfMeta vcfMeta,
      VcfAttributes vcfAttributes,
      EntityTypeFactory entityTypeFactory,
      AttributeFactory attrMetaFactory); Entity toEntity(VcfRecord vcfRecord); EntityType getEntityType();  }