BusinessObjectFormatExternalInterfaceDescriptiveInformationServiceImpl implements BusinessObjectFormatExternalInterfaceDescriptiveInformationService { @Override public BusinessObjectFormatExternalInterfaceDescriptiveInformation getBusinessObjectFormatExternalInterfaceDescriptiveInformation( BusinessObjectFormatExternalInterfaceKey businessObjectFormatExternalInterfaceKey) { businessObjectFormatExternalInterfaceHelper.validateAndTrimBusinessObjectFormatExternalInterfaceKey(businessObjectFormatExternalInterfaceKey); businessObjectFormatExternalInterfaceDaoHelper.getBusinessObjectFormatExternalInterfaceEntity(businessObjectFormatExternalInterfaceKey); ExternalInterfaceEntity externalInterfaceEntity = externalInterfaceDaoHelper.getExternalInterfaceEntity(businessObjectFormatExternalInterfaceKey.getExternalInterfaceName()); BusinessObjectFormatKey businessObjectFormatKey = new BusinessObjectFormatKey(businessObjectFormatExternalInterfaceKey.getNamespace(), businessObjectFormatExternalInterfaceKey.getBusinessObjectDefinitionName(), businessObjectFormatExternalInterfaceKey.getBusinessObjectFormatUsage(), businessObjectFormatExternalInterfaceKey.getBusinessObjectFormatFileType(), null); BusinessObjectFormatEntity businessObjectFormatEntity = businessObjectFormatDaoHelper.getBusinessObjectFormatEntity(businessObjectFormatKey); return businessObjectFormatExternalInterfaceDescriptiveInformationHelper .createBusinessObjectFormatExternalInterfaceDescriptiveInformationFromEntities(businessObjectFormatEntity, externalInterfaceEntity); }  @Override BusinessObjectFormatExternalInterfaceDescriptiveInformation getBusinessObjectFormatExternalInterfaceDescriptiveInformation(
        BusinessObjectFormatExternalInterfaceKey businessObjectFormatExternalInterfaceKey);  }
@Test public void testGetBusinessObjectFormatExternalInterfaceDescriptiveInformation() { BusinessObjectFormatExternalInterfaceKey businessObjectFormatExternalInterfaceKey = new BusinessObjectFormatExternalInterfaceKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, EXTERNAL_INTERFACE); BusinessObjectFormatKey businessObjectFormatKey = new BusinessObjectFormatKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, null); ExternalInterfaceEntity externalInterfaceEntity = new ExternalInterfaceEntity(); BusinessObjectFormatEntity businessObjectFormatEntity = new BusinessObjectFormatEntity(); BusinessObjectFormatExternalInterfaceDescriptiveInformation businessObjectFormatExternalInterfaceDescriptiveInformation = new BusinessObjectFormatExternalInterfaceDescriptiveInformation(businessObjectFormatExternalInterfaceKey, DISPLAY_NAME_FIELD, DESCRIPTION); when(externalInterfaceDaoHelper.getExternalInterfaceEntity(EXTERNAL_INTERFACE)).thenReturn(externalInterfaceEntity); when(businessObjectFormatDaoHelper.getBusinessObjectFormatEntity(businessObjectFormatKey)).thenReturn(businessObjectFormatEntity); when(businessObjectFormatExternalInterfaceDescriptiveInformationHelper .createBusinessObjectFormatExternalInterfaceDescriptiveInformationFromEntities(businessObjectFormatEntity, externalInterfaceEntity)) .thenReturn(businessObjectFormatExternalInterfaceDescriptiveInformation); BusinessObjectFormatExternalInterfaceDescriptiveInformation result = businessObjectFormatExternalInterfaceDescriptiveInformationService .getBusinessObjectFormatExternalInterfaceDescriptiveInformation(businessObjectFormatExternalInterfaceKey); assertEquals(businessObjectFormatExternalInterfaceDescriptiveInformation, result); verify(businessObjectFormatExternalInterfaceHelper).validateAndTrimBusinessObjectFormatExternalInterfaceKey(businessObjectFormatExternalInterfaceKey); verify(businessObjectFormatExternalInterfaceDaoHelper).getBusinessObjectFormatExternalInterfaceEntity(businessObjectFormatExternalInterfaceKey); verify(externalInterfaceDaoHelper).getExternalInterfaceEntity(EXTERNAL_INTERFACE); verify(businessObjectFormatDaoHelper).getBusinessObjectFormatEntity(businessObjectFormatKey); verify(businessObjectFormatExternalInterfaceDescriptiveInformationHelper) .createBusinessObjectFormatExternalInterfaceDescriptiveInformationFromEntities(businessObjectFormatEntity, externalInterfaceEntity); verifyNoMoreInteractionsHelper(); }