@Test public void testGetComponentDetailsForProcessor(){ HttpServletRequest request = mock(HttpServletRequest.class); NiFiWebConfigurationContext configurationContext = mock(NiFiWebConfigurationContext.class); when(configurationContext.getComponentDetails(any(HttpServletRequestContext.class))).thenReturn(new ComponentDetails.Builder().build()); ComponentDetails componentDetails = ProcessorWebUtils.getComponentDetails(configurationContext,"1",request); assertNotNull(componentDetails); }
static ComponentDetails getComponentDetails(final NiFiWebConfigurationContext configurationContext,final String processorId, final Long revision, final String clientId, HttpServletRequest request){ final NiFiWebRequestContext requestContext; if(processorId != null && revision != null && clientId != null){ requestContext = getRequestContext(processorId, revision, clientId, request) ; } else{ requestContext = getRequestContext(processorId,request); } return configurationContext.getComponentDetails(requestContext); }
ProcessorWebUtils { static ComponentDetails getComponentDetails(final NiFiWebConfigurationContext configurationContext,final String processorId, final Long revision, final String clientId, HttpServletRequest request){ final NiFiWebRequestContext requestContext; if(processorId != null && revision != null && clientId != null){ requestContext = getRequestContext(processorId, revision, clientId, request) ; } else{ requestContext = getRequestContext(processorId,request); } return configurationContext.getComponentDetails(requestContext); } }
ProcessorWebUtils { static ComponentDetails getComponentDetails(final NiFiWebConfigurationContext configurationContext,final String processorId, final Long revision, final String clientId, HttpServletRequest request){ final NiFiWebRequestContext requestContext; if(processorId != null && revision != null && clientId != null){ requestContext = getRequestContext(processorId, revision, clientId, request) ; } else{ requestContext = getRequestContext(processorId,request); } return configurationContext.getComponentDetails(requestContext); }  }
ProcessorWebUtils { static ComponentDetails getComponentDetails(final NiFiWebConfigurationContext configurationContext,final String processorId, final Long revision, final String clientId, HttpServletRequest request){ final NiFiWebRequestContext requestContext; if(processorId != null && revision != null && clientId != null){ requestContext = getRequestContext(processorId, revision, clientId, request) ; } else{ requestContext = getRequestContext(processorId,request); } return configurationContext.getComponentDetails(requestContext); }   }
ProcessorWebUtils { static ComponentDetails getComponentDetails(final NiFiWebConfigurationContext configurationContext,final String processorId, final Long revision, final String clientId, HttpServletRequest request){ final NiFiWebRequestContext requestContext; if(processorId != null && revision != null && clientId != null){ requestContext = getRequestContext(processorId, revision, clientId, request) ; } else{ requestContext = getRequestContext(processorId,request); } return configurationContext.getComponentDetails(requestContext); }    }