@Test void getExternalDataEngineByQualifiedName_ResponseWithCapturedInvalidParameterException() throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException { String methodName = "getExternalDataEngineByQualifiedName"; mockRegistrationHandler(methodName); InvalidParameterException mockedException = mockException(InvalidParameterException.class, methodName); when(dataEngineRegistrationHandler.getExternalDataEngineByQualifiedName(USER, QUALIFIED_NAME)).thenThrow(mockedException); GUIDResponse response = dataEngineRESTServices.getExternalDataEngineByQualifiedName(SERVER_NAME, USER, QUALIFIED_NAME); verify(restExceptionHandler, times(1)).captureInvalidParameterException(response, mockedException); }
public GUIDResponse getExternalDataEngineByQualifiedName(String serverName, String userId, String qualifiedName) { final String methodName = "getExternalDataEngineByQualifiedName"; log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, qualifiedName); GUIDResponse response = new GUIDResponse(); try { DataEngineRegistrationHandler handler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); response.setGUID(handler.getExternalDataEngineByQualifiedName(userId, qualifiedName)); } catch (InvalidParameterException error) { restExceptionHandler.captureInvalidParameterException(response, error); } catch (PropertyServerException error) { restExceptionHandler.capturePropertyServerException(response, error); } catch (UserNotAuthorizedException error) { restExceptionHandler.captureUserNotAuthorizedException(response, error); } log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, response); return response; }
DataEngineRESTServices { public GUIDResponse getExternalDataEngineByQualifiedName(String serverName, String userId, String qualifiedName) { final String methodName = "getExternalDataEngineByQualifiedName"; log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, qualifiedName); GUIDResponse response = new GUIDResponse(); try { DataEngineRegistrationHandler handler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); response.setGUID(handler.getExternalDataEngineByQualifiedName(userId, qualifiedName)); } catch (InvalidParameterException error) { restExceptionHandler.captureInvalidParameterException(response, error); } catch (PropertyServerException error) { restExceptionHandler.capturePropertyServerException(response, error); } catch (UserNotAuthorizedException error) { restExceptionHandler.captureUserNotAuthorizedException(response, error); } log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, response); return response; } }
DataEngineRESTServices { public GUIDResponse getExternalDataEngineByQualifiedName(String serverName, String userId, String qualifiedName) { final String methodName = "getExternalDataEngineByQualifiedName"; log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, qualifiedName); GUIDResponse response = new GUIDResponse(); try { DataEngineRegistrationHandler handler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); response.setGUID(handler.getExternalDataEngineByQualifiedName(userId, qualifiedName)); } catch (InvalidParameterException error) { restExceptionHandler.captureInvalidParameterException(response, error); } catch (PropertyServerException error) { restExceptionHandler.capturePropertyServerException(response, error); } catch (UserNotAuthorizedException error) { restExceptionHandler.captureUserNotAuthorizedException(response, error); } log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, response); return response; }  }
DataEngineRESTServices { public GUIDResponse getExternalDataEngineByQualifiedName(String serverName, String userId, String qualifiedName) { final String methodName = "getExternalDataEngineByQualifiedName"; log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, qualifiedName); GUIDResponse response = new GUIDResponse(); try { DataEngineRegistrationHandler handler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); response.setGUID(handler.getExternalDataEngineByQualifiedName(userId, qualifiedName)); } catch (InvalidParameterException error) { restExceptionHandler.captureInvalidParameterException(response, error); } catch (PropertyServerException error) { restExceptionHandler.capturePropertyServerException(response, error); } catch (UserNotAuthorizedException error) { restExceptionHandler.captureUserNotAuthorizedException(response, error); } log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, response); return response; }  GUIDResponse createExternalDataEngine(String serverName, String userId,
                                                 DataEngineRegistrationRequestBody requestBody); GUIDResponse getExternalDataEngineByQualifiedName(String serverName, String userId, String qualifiedName); GUIDResponse createOrUpdateSchemaType(String userId, String serverName, SchemaTypeRequestBody schemaTypeRequestBody); GUIDResponse createOrUpdatePortImplementation(String userId, String serverName,
                                                         PortImplementationRequestBody portImplementationRequestBody); GUIDResponse createOrUpdatePortAlias(String userId, String serverName, PortAliasRequestBody portAliasRequestBody); ProcessListResponse createOrUpdateProcesses(String userId, String serverName, ProcessesRequestBody processesRequestBody); String createOrUpdatePortAliasWithDelegation(String userId, String serverName, PortAlias portAlias, String externalSourceName); String createOrUpdatePortImplementationWithSchemaType(String userId, String serverName, PortImplementation portImplementation,
                                                                 String externalSourceName); String createExternalDataEngine(String userId, String serverName, SoftwareServerCapability softwareServerCapability); void addPortsToProcess(String userId, String serverName, String processGUID, List<String> portQualifiedNames, String externalSourceName); void addLineageMappings(String userId, String serverName, List<LineageMapping> lineageMappings, FFDCResponseBase response,
                                   String externalSourceName); ProcessListResponse createOrUpdateProcesses(String userId, String serverName, List<Process> processes, String externalSourceName); GUIDResponse addPortsToProcess(String userId, String serverName, String processGuid, PortListRequestBody portListRequestBody); VoidResponse addLineageMappings(String userId, String serverName, LineageMappingsRequestBody lineageMappingsRequestBody); ConnectionResponse getInTopicConnection(String serverName, String userId); String createOrUpdateSchemaType(String userId, String serverName, SchemaType schemaType, String externalSourceName); }
DataEngineRESTServices { public GUIDResponse getExternalDataEngineByQualifiedName(String serverName, String userId, String qualifiedName) { final String methodName = "getExternalDataEngineByQualifiedName"; log.debug(DEBUG_MESSAGE_METHOD_DETAILS, methodName, qualifiedName); GUIDResponse response = new GUIDResponse(); try { DataEngineRegistrationHandler handler = instanceHandler.getRegistrationHandler(userId, serverName, methodName); response.setGUID(handler.getExternalDataEngineByQualifiedName(userId, qualifiedName)); } catch (InvalidParameterException error) { restExceptionHandler.captureInvalidParameterException(response, error); } catch (PropertyServerException error) { restExceptionHandler.capturePropertyServerException(response, error); } catch (UserNotAuthorizedException error) { restExceptionHandler.captureUserNotAuthorizedException(response, error); } log.debug(DEBUG_MESSAGE_METHOD_RETURN, methodName, response); return response; }  GUIDResponse createExternalDataEngine(String serverName, String userId,
                                                 DataEngineRegistrationRequestBody requestBody); GUIDResponse getExternalDataEngineByQualifiedName(String serverName, String userId, String qualifiedName); GUIDResponse createOrUpdateSchemaType(String userId, String serverName, SchemaTypeRequestBody schemaTypeRequestBody); GUIDResponse createOrUpdatePortImplementation(String userId, String serverName,
                                                         PortImplementationRequestBody portImplementationRequestBody); GUIDResponse createOrUpdatePortAlias(String userId, String serverName, PortAliasRequestBody portAliasRequestBody); ProcessListResponse createOrUpdateProcesses(String userId, String serverName, ProcessesRequestBody processesRequestBody); String createOrUpdatePortAliasWithDelegation(String userId, String serverName, PortAlias portAlias, String externalSourceName); String createOrUpdatePortImplementationWithSchemaType(String userId, String serverName, PortImplementation portImplementation,
                                                                 String externalSourceName); String createExternalDataEngine(String userId, String serverName, SoftwareServerCapability softwareServerCapability); void addPortsToProcess(String userId, String serverName, String processGUID, List<String> portQualifiedNames, String externalSourceName); void addLineageMappings(String userId, String serverName, List<LineageMapping> lineageMappings, FFDCResponseBase response,
                                   String externalSourceName); ProcessListResponse createOrUpdateProcesses(String userId, String serverName, List<Process> processes, String externalSourceName); GUIDResponse addPortsToProcess(String userId, String serverName, String processGuid, PortListRequestBody portListRequestBody); VoidResponse addLineageMappings(String userId, String serverName, LineageMappingsRequestBody lineageMappingsRequestBody); ConnectionResponse getInTopicConnection(String serverName, String userId); String createOrUpdateSchemaType(String userId, String serverName, SchemaType schemaType, String externalSourceName); static final String EXCEPTION_WHILE_ADDING_LINEAGE_MAPPING; static final String EXCEPTION_WHILE_CREATING_PROCESS; static final String EXCEPTION_WHILE_CREATING_PROCESS_HIERARCHY; }