@Test void createExternalEntity() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { String methodName = "createExternalEntity"; when(repositoryHandler.createExternalEntity(USER, ENTITY_TYPE_GUID, ENTITY_TYPE_NAME, EXTERNAL_SOURCE_DE_GUID, EXTERNAL_SOURCE_DE_QUALIFIED_NAME, instanceProperties, InstanceStatus.ACTIVE, methodName)).thenReturn(GUID); String result = dataEngineCommonHandler.createExternalEntity(USER, instanceProperties, InstanceStatus.ACTIVE, ENTITY_TYPE_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME); assertEquals(GUID, result); }
protected String createExternalEntity(String userId, InstanceProperties instanceProperties, InstanceStatus instanceStatus, String entityTypeName, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { final String methodName = "createExternalEntity"; String externalSourceGUID = dataEngineRegistrationHandler.getExternalDataEngineByQualifiedName(userId, externalSourceName); TypeDef entityTypeDef = repositoryHelper.getTypeDefByName(userId, entityTypeName); return repositoryHandler.createExternalEntity(userId, entityTypeDef.getGUID(), entityTypeDef.getName(), externalSourceGUID, externalSourceName, instanceProperties, instanceStatus, methodName); }
DataEngineCommonHandler { protected String createExternalEntity(String userId, InstanceProperties instanceProperties, InstanceStatus instanceStatus, String entityTypeName, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { final String methodName = "createExternalEntity"; String externalSourceGUID = dataEngineRegistrationHandler.getExternalDataEngineByQualifiedName(userId, externalSourceName); TypeDef entityTypeDef = repositoryHelper.getTypeDefByName(userId, entityTypeName); return repositoryHandler.createExternalEntity(userId, entityTypeDef.getGUID(), entityTypeDef.getName(), externalSourceGUID, externalSourceName, instanceProperties, instanceStatus, methodName); } }
DataEngineCommonHandler { protected String createExternalEntity(String userId, InstanceProperties instanceProperties, InstanceStatus instanceStatus, String entityTypeName, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { final String methodName = "createExternalEntity"; String externalSourceGUID = dataEngineRegistrationHandler.getExternalDataEngineByQualifiedName(userId, externalSourceName); TypeDef entityTypeDef = repositoryHelper.getTypeDefByName(userId, entityTypeName); return repositoryHandler.createExternalEntity(userId, entityTypeDef.getGUID(), entityTypeDef.getName(), externalSourceGUID, externalSourceName, instanceProperties, instanceStatus, methodName); } DataEngineCommonHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler,
                                   RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper,
                                   DataEngineRegistrationHandler dataEngineRegistrationHandler); }
DataEngineCommonHandler { protected String createExternalEntity(String userId, InstanceProperties instanceProperties, InstanceStatus instanceStatus, String entityTypeName, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { final String methodName = "createExternalEntity"; String externalSourceGUID = dataEngineRegistrationHandler.getExternalDataEngineByQualifiedName(userId, externalSourceName); TypeDef entityTypeDef = repositoryHelper.getTypeDefByName(userId, entityTypeName); return repositoryHandler.createExternalEntity(userId, entityTypeDef.getGUID(), entityTypeDef.getName(), externalSourceGUID, externalSourceName, instanceProperties, instanceStatus, methodName); } DataEngineCommonHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler,
                                   RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper,
                                   DataEngineRegistrationHandler dataEngineRegistrationHandler);  }
DataEngineCommonHandler { protected String createExternalEntity(String userId, InstanceProperties instanceProperties, InstanceStatus instanceStatus, String entityTypeName, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { final String methodName = "createExternalEntity"; String externalSourceGUID = dataEngineRegistrationHandler.getExternalDataEngineByQualifiedName(userId, externalSourceName); TypeDef entityTypeDef = repositoryHelper.getTypeDefByName(userId, entityTypeName); return repositoryHandler.createExternalEntity(userId, entityTypeDef.getGUID(), entityTypeDef.getName(), externalSourceGUID, externalSourceName, instanceProperties, instanceStatus, methodName); } DataEngineCommonHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler,
                                   RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper,
                                   DataEngineRegistrationHandler dataEngineRegistrationHandler);   }