BusinessObjectFormatExternalInterfaceHelper { public BusinessObjectFormatExternalInterfaceKey createBusinessObjectFormatExternalInterfaceKeyFromEntity( BusinessObjectFormatExternalInterfaceEntity businessObjectFormatExternalInterfaceEntity) { return new BusinessObjectFormatExternalInterfaceKey( businessObjectFormatExternalInterfaceEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getNamespace().getCode(), businessObjectFormatExternalInterfaceEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getName(), businessObjectFormatExternalInterfaceEntity.getBusinessObjectFormat().getUsage(), businessObjectFormatExternalInterfaceEntity.getBusinessObjectFormat().getFileType().getCode(), businessObjectFormatExternalInterfaceEntity.getExternalInterface().getCode()); }  BusinessObjectFormatExternalInterface createBusinessObjectFormatExternalInterfaceFromEntity(
        BusinessObjectFormatExternalInterfaceEntity businessObjectFormatExternalInterfaceEntity); BusinessObjectFormatExternalInterfaceKey createBusinessObjectFormatExternalInterfaceKeyFromEntity(
        BusinessObjectFormatExternalInterfaceEntity businessObjectFormatExternalInterfaceEntity); void validateAndTrimBusinessObjectFormatExternalInterfaceCreateRequest(
        BusinessObjectFormatExternalInterfaceCreateRequest businessObjectFormatExternalInterfaceCreateRequest); void validateAndTrimBusinessObjectFormatExternalInterfaceKey(BusinessObjectFormatExternalInterfaceKey businessObjectFormatExternalInterfaceKey);  }
@Test public void testCreateBusinessObjectFormatExternalInterfaceKeyFromEntity() { NamespaceEntity namespaceEntity = new NamespaceEntity(); namespaceEntity.setCode(NAMESPACE); BusinessObjectDefinitionEntity businessObjectDefinitionEntity = new BusinessObjectDefinitionEntity(); businessObjectDefinitionEntity.setNamespace(namespaceEntity); businessObjectDefinitionEntity.setName(BDEF_NAME); FileTypeEntity fileTypeEntity = new FileTypeEntity(); fileTypeEntity.setCode(FORMAT_FILE_TYPE_CODE); BusinessObjectFormatEntity businessObjectFormatEntity = new BusinessObjectFormatEntity(); businessObjectFormatEntity.setBusinessObjectDefinition(businessObjectDefinitionEntity); businessObjectFormatEntity.setUsage(FORMAT_USAGE_CODE); businessObjectFormatEntity.setFileType(fileTypeEntity); ExternalInterfaceEntity externalInterfaceEntity = new ExternalInterfaceEntity(); externalInterfaceEntity.setCode(EXTERNAL_INTERFACE); BusinessObjectFormatExternalInterfaceEntity businessObjectFormatExternalInterfaceEntity = new BusinessObjectFormatExternalInterfaceEntity(); businessObjectFormatExternalInterfaceEntity.setId(ID); businessObjectFormatExternalInterfaceEntity.setBusinessObjectFormat(businessObjectFormatEntity); businessObjectFormatExternalInterfaceEntity.setExternalInterface(externalInterfaceEntity); BusinessObjectFormatExternalInterfaceKey result = businessObjectFormatExternalInterfaceHelper.createBusinessObjectFormatExternalInterfaceKeyFromEntity(businessObjectFormatExternalInterfaceEntity); assertEquals(new BusinessObjectFormatExternalInterfaceKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, EXTERNAL_INTERFACE), result); verifyNoMoreInteractions(alternateKeyHelper); }