@Test
public void metafileEntityToDTO() throws Exception {

    MetatableTransformer metatableTransformer = new MetatableTransformer();
    MetatableEntity metatableEntity = TestHelper.getMetatableEntity(MetatableType.MASTER);
    MetatableDTO metatableDTO = metatableTransformer.metafileEntityToDTO(metatableEntity);
    assertEquals(metatableDTO.getType(), metatableEntity.getType());
    assertEquals(metatableDTO.getVersion(), metatableEntity.getVersion());
    assertEquals(metatableDTO.getUuid(), metatableEntity.getUuid());
    assertEquals(metatableDTO.getLastUpdateTimestamp(),
            metatableEntity.getLastUpdateTimestamp());
    assertEquals(metatableDTO.getMetafileSet().size(), metatableEntity.getMetafileSet()
            .size());
    int countEquals = compareMetafileDTOAndEntitySet(metatableDTO.getMetafileSet(),
            metatableEntity.getMetafileSet());
    assertEquals(countEquals, metatableDTO.getMetafileSet().size());
}