### Question:
FactTypeHelper { public Set<FactTypeEntity.MetaFactBindingDefinition> convertMetaFactBindingDefinitions(List<MetaFactBindingDefinition> bindingDefinitions) { if (CollectionUtils.isEmpty(bindingDefinitions)) return null; return bindingDefinitions.stream() .map(r -> new FactTypeEntity.MetaFactBindingDefinition().setFactTypeID(r.getFactType())) .collect(Collectors.toSet()); } @Inject  FactTypeHelper(FactManager factManager, ObjectManager objectManager); void assertFactTypeNotExists(String name); void assertObjectTypesToBindExist(List<FactObjectBindingDefinition> bindingDefinitions, String propertyName); void assertFactTypesToBindExist(List<MetaFactBindingDefinition> bindingDefinitions, String propertyName); Set<FactTypeEntity.FactObjectBindingDefinition> convertFactObjectBindingDefinitions(List<FactObjectBindingDefinition> bindingDefinitions); Set<FactTypeEntity.MetaFactBindingDefinition> convertMetaFactBindingDefinitions(List<MetaFactBindingDefinition> bindingDefinitions);  }### Answer:
@Test public void testConvertMetaFactBindingDefinitionsWithoutBindings() { assertNull(helper.convertMetaFactBindingDefinitions(null)); assertNull(helper.convertMetaFactBindingDefinitions(ListUtils.list())); }
@Test public void testConvertMetaFactBindingDefinitionsWithBindings() { MetaFactBindingDefinition request1 = new MetaFactBindingDefinition() .setFactType(UUID.randomUUID()); MetaFactBindingDefinition request2 = new MetaFactBindingDefinition() .setFactType(UUID.randomUUID()); FactTypeEntity.MetaFactBindingDefinition entity1 = new FactTypeEntity.MetaFactBindingDefinition() .setFactTypeID(request1.getFactType()); FactTypeEntity.MetaFactBindingDefinition entity2 = new FactTypeEntity.MetaFactBindingDefinition() .setFactTypeID(request2.getFactType()); assertEquals(SetUtils.set(entity1, entity2), helper.convertMetaFactBindingDefinitions(ListUtils.list(request1, request2))); }