@Test
public void metafileDTOtoEntity() throws Exception {

    MetatableTransformer metatableTransformer = new MetatableTransformer();
    MetatableDTO metatableDTO = TestHelper
            .getMetatableDTO(UUID.randomUUID().toString(), "0.0.0", MetatableType.MASTER,
                    new DateTime().getTimeInMillisec());
    MetatableEntity metatableEntity = metatableTransformer.metafileDTOtoEntity(metatableDTO);
    assertEquals(metatableEntity.getType(), metatableDTO.getType());
    assertEquals(metatableEntity.getVersion(), metatableDTO.getVersion());
    assertEquals(metatableEntity.getUuid(), metatableDTO.getUuid());
    assertEquals(metatableEntity.getLastUpdateTimestamp(),
            metatableDTO.getLastUpdateTimestamp());
    MetafileDTO[] metafileDTOs = new MetafileDTO[metatableDTO.getMetafileSet().size()];
    metatableDTO.getMetafileSet().toArray(metafileDTOs);
    MetafileEntity[] metafileEntities = new MetafileEntity[metatableEntity.getMetafileSet()
            .size()];
    metatableEntity.getMetafileSet().toArray(metafileEntities);
    assertEquals(metafileDTOs.length, metafileEntities.length);
    int countEquals = compareMetafileDTOAndEntitySet(metatableDTO.getMetafileSet(),
            metatableEntity.getMetafileSet());
    assertEquals(countEquals, metafileDTOs.length);
}