@Test void createPortImplementation() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { String methodName = "createPort"; when(dataEngineCommonHandler.createExternalEntity(USER, null, InstanceStatus.ACTIVE, PortPropertiesMapper.PORT_IMPLEMENTATION_TYPE_NAME, EXTERNAL_SOURCE_DE_QUALIFIED_NAME)).thenReturn(GUID); String result = portHandler.createPortImplementation(USER, getPortImplementation(), EXTERNAL_SOURCE_DE_QUALIFIED_NAME); assertEquals(GUID, result); verify(invalidParameterHandler, times(1)).validateUserId(USER, methodName); verify(invalidParameterHandler, times(1)).validateName(QUALIFIED_NAME, PortPropertiesMapper.QUALIFIED_NAME_PROPERTY_NAME, methodName); }
public String createPortImplementation(String userId, PortImplementation portImplementation, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { return createPort(userId, portImplementation, PortPropertiesMapper.PORT_IMPLEMENTATION_TYPE_NAME, externalSourceName); }
PortHandler { public String createPortImplementation(String userId, PortImplementation portImplementation, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { return createPort(userId, portImplementation, PortPropertiesMapper.PORT_IMPLEMENTATION_TYPE_NAME, externalSourceName); } }
PortHandler { public String createPortImplementation(String userId, PortImplementation portImplementation, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { return createPort(userId, portImplementation, PortPropertiesMapper.PORT_IMPLEMENTATION_TYPE_NAME, externalSourceName); } PortHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler,
                       OMRSRepositoryHelper repositoryHelper, DataEngineCommonHandler dataEngineCommonHandler); }
PortHandler { public String createPortImplementation(String userId, PortImplementation portImplementation, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { return createPort(userId, portImplementation, PortPropertiesMapper.PORT_IMPLEMENTATION_TYPE_NAME, externalSourceName); } PortHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler,
                       OMRSRepositoryHelper repositoryHelper, DataEngineCommonHandler dataEngineCommonHandler); String createPortImplementation(String userId, PortImplementation portImplementation, String externalSourceName); String createPortAlias(String userId, PortAlias portAlias, String externalSourceName); void updatePortImplementation(String userId, EntityDetail originalPortEntity, PortImplementation portImplementation); void updatePortAlias(String userId, EntityDetail originalPortEntity, PortAlias portAlias); void addPortSchemaRelationship(String userId, String portGUID, String schemaTypeGUID, String externalSourceName); String findSchemaTypeForPort(String userId, String portGUID); void addPortDelegationRelationship(String userId, String portGUID, PortType portType, String delegatesToQualifiedName,
                                              String externalSourceName); void removePort(String userId, String portGUID, String entityTypeName); Optional<EntityDetail> findPortImplementationEntity(String userId, String qualifiedName); Optional<EntityDetail> findPortAliasEntity(String userId, String qualifiedName); Optional<EntityDetail> findPortEntity(String userId, String qualifiedName); }
PortHandler { public String createPortImplementation(String userId, PortImplementation portImplementation, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { return createPort(userId, portImplementation, PortPropertiesMapper.PORT_IMPLEMENTATION_TYPE_NAME, externalSourceName); } PortHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler,
                       OMRSRepositoryHelper repositoryHelper, DataEngineCommonHandler dataEngineCommonHandler); String createPortImplementation(String userId, PortImplementation portImplementation, String externalSourceName); String createPortAlias(String userId, PortAlias portAlias, String externalSourceName); void updatePortImplementation(String userId, EntityDetail originalPortEntity, PortImplementation portImplementation); void updatePortAlias(String userId, EntityDetail originalPortEntity, PortAlias portAlias); void addPortSchemaRelationship(String userId, String portGUID, String schemaTypeGUID, String externalSourceName); String findSchemaTypeForPort(String userId, String portGUID); void addPortDelegationRelationship(String userId, String portGUID, PortType portType, String delegatesToQualifiedName,
                                              String externalSourceName); void removePort(String userId, String portGUID, String entityTypeName); Optional<EntityDetail> findPortImplementationEntity(String userId, String qualifiedName); Optional<EntityDetail> findPortAliasEntity(String userId, String qualifiedName); Optional<EntityDetail> findPortEntity(String userId, String qualifiedName);  }