test_class.declarator: sessionid = "test-sessionId"
test_class.modifier: private
test_class.original_string: private String sessionid = "test-sessionId";
test_class.type: String
test_class.var_name: sessionid
test_class.declarator: testee
test_class.modifier: @InjectMocks
  	private
test_class.original_string: @InjectMocks
  	private WebActionControllerAdvice testee;
test_class.type: WebActionControllerAdvice
test_class.var_name: testee
test_class.declarator: interceptor
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private CommandTransactionInterceptor interceptor;
test_class.type: CommandTransactionInterceptor
test_class.var_name: interceptor
test_class.file: nimbus-core/src/test/java/com/antheminc/oss/nimbus/channel/web/WebActionControllerAdviceTest.java
test_class.identifier: WebActionControllerAdviceTest
test_case.body: @Test
  	public void testMethodArgumentNotValidExceptionHandler() throws NoSuchMethodException, SecurityException {
  		final MethodArgumentNotValidException ex = Mockito.mock(MethodArgumentNotValidException.class);
  		final MultiExecuteOutput expected = new MultiExecuteOutput(sessionid);
  		
  		Mockito.when(this.interceptor.handleResponse(Mockito.isA(ExecuteOutput.class))).thenReturn(expected);
  		final MultiExecuteOutput actual = this.testee.exception(ex);
  		
  		final ArgumentCaptor<ExecuteOutput> respCaptor = ArgumentCaptor.forClass(ExecuteOutput.class);
  		Mockito.verify(this.interceptor, Mockito.only()).handleResponse(respCaptor.capture());
  		
  		Assert.assertEquals(expected, actual);
  		Assert.assertNotNull(respCaptor.getValue().getValidationResult());
  		Assert.assertNotNull(respCaptor.getValue().getValidationResult().getErrors());
  	}
test_case.class_method_signature: WebActionControllerAdviceTest.testMethodArgumentNotValidExceptionHandler()
test_case.full_signature: @Test public void testMethodArgumentNotValidExceptionHandler()
test_case.identifier: testMethodArgumentNotValidExceptionHandler
test_case.invocations: mock thenReturn when handleResponse isA exception forClass handleResponse verify only capture assertEquals assertNotNull getValidationResult getValue assertNotNull getErrors getValidationResult getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMethodArgumentNotValidExceptionHandler()
focal_class.declarator: logit = new JustLogit(this.getClass())
focal_class.modifier: private
focal_class.original_string: private JustLogit logit = new JustLogit(this.getClass());
focal_class.type: JustLogit
focal_class.var_name: logit
focal_class.declarator: RESPONSE_INTERCEPTOR_BEAN_PREFIX = "httpresponsebodyinterceptor."
focal_class.modifier: private static final
focal_class.original_string: private static final String RESPONSE_INTERCEPTOR_BEAN_PREFIX = "httpresponsebodyinterceptor.";
focal_class.type: String
focal_class.var_name: RESPONSE_INTERCEPTOR_BEAN_PREFIX
focal_class.declarator: metricLoggingEnabled
focal_class.modifier: @Value("${nimbus.error.metricLoggingEnabled:true}")
  	private
focal_class.original_string: @Value("${nimbus.error.metricLoggingEnabled:true}")
  	private boolean metricLoggingEnabled;
focal_class.type: boolean
focal_class.var_name: metricLoggingEnabled
focal_class.declarator: exceptions
focal_class.modifier: @Getter @Setter
  	private
focal_class.original_string: @Getter @Setter
  	private Map<Class<?>,String> exceptions;
focal_class.type: Map<Class<?>,String>
focal_class.var_name: exceptions
focal_class.declarator: genericMsg
focal_class.modifier: @Value("${nimbus.error.genericMsg:System Error ERR.UNIQUEID}")
  	private
focal_class.original_string: @Value("${nimbus.error.genericMsg:System Error ERR.UNIQUEID}")
  	private String genericMsg;
focal_class.type: String
focal_class.var_name: genericMsg
focal_class.declarator: defaultInterceptor
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired CommandTransactionInterceptor defaultInterceptor;
focal_class.type: CommandTransactionInterceptor
focal_class.var_name: defaultInterceptor
focal_class.declarator: beanResolver
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired BeanResolverStrategy beanResolver;
focal_class.type: BeanResolverStrategy
focal_class.var_name: beanResolver
focal_class.file: nimbus-core/src/main/java/com/antheminc/oss/nimbus/channel/web/WebActionControllerAdvice.java
focal_class.identifier: WebActionControllerAdvice
focal_class.interfaces: implements ResponseBodyAdvice<Object>
focal_class.class_method_signature: WebActionControllerAdvice.supports(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType)
focal_class.full_signature: @Override public boolean supports(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType)
focal_class.identifier: supports
focal_class.modifiers: @Override public
focal_class.parameters: (MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType)
focal_class.return: boolean
focal_class.signature: boolean supports(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType)
focal_class.class_method_signature: WebActionControllerAdvice.beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, 
  			Class<? extends HttpMessageConverter<?>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, 
  			Class<? extends HttpMessageConverter<?>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response)
focal_class.identifier: beforeBodyWrite
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (Object body, MethodParameter returnType, MediaType selectedContentType, 
  			Class<? extends HttpMessageConverter<?>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response)
focal_class.return: Object
focal_class.signature: Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, 
  			Class<? extends HttpMessageConverter<?>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response)
focal_class.class_method_signature: WebActionControllerAdvice.exception(Throwable pEx)
focal_class.full_signature: @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR) @ExceptionHandler(Throwable.class) @ResponseBody public MultiExecuteOutput exception(Throwable pEx)
focal_class.identifier: exception
focal_class.modifiers: @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR) @ExceptionHandler(Throwable.class) @ResponseBody public
focal_class.parameters: (Throwable pEx)
focal_class.return: MultiExecuteOutput
focal_class.signature: MultiExecuteOutput exception(Throwable pEx)
focal_class.class_method_signature: WebActionControllerAdvice.logError(ExecuteError execError, Throwable pEx)
focal_class.full_signature: private void logError(ExecuteError execError, Throwable pEx)
focal_class.identifier: logError
focal_class.modifiers: private
focal_class.parameters: (ExecuteError execError, Throwable pEx)
focal_class.return: void
focal_class.signature: void logError(ExecuteError execError, Throwable pEx)
focal_class.class_method_signature: WebActionControllerAdvice.exception(MethodArgumentNotValidException vEx)
focal_class.full_signature: @ResponseStatus(value = HttpStatus.UNPROCESSABLE_ENTITY) @ExceptionHandler(MethodArgumentNotValidException.class) @ResponseBody public MultiExecuteOutput exception(MethodArgumentNotValidException vEx)
focal_class.identifier: exception
focal_class.modifiers: @ResponseStatus(value = HttpStatus.UNPROCESSABLE_ENTITY) @ExceptionHandler(MethodArgumentNotValidException.class) @ResponseBody public
focal_class.parameters: (MethodArgumentNotValidException vEx)
focal_class.return: MultiExecuteOutput
focal_class.signature: MultiExecuteOutput exception(MethodArgumentNotValidException vEx)
focal_class.class_method_signature: WebActionControllerAdvice.constructMessage(ExecuteError err)
focal_class.full_signature: private String constructMessage(ExecuteError err)
focal_class.identifier: constructMessage
focal_class.modifiers: private
focal_class.parameters: (ExecuteError err)
focal_class.return: String
focal_class.signature: String constructMessage(ExecuteError err)
focal_class.class_method_signature: WebActionControllerAdvice.constructMessage(String configMsg, ExecuteError err)
focal_class.full_signature: private String constructMessage(String configMsg, ExecuteError err)
focal_class.identifier: constructMessage
focal_class.modifiers: private
focal_class.parameters: (String configMsg, ExecuteError err)
focal_class.return: String
focal_class.signature: String constructMessage(String configMsg, ExecuteError err)
focal_class.class_method_signature: WebActionControllerAdvice.constructExecError(Throwable pEx)
focal_class.full_signature: private ExecuteError constructExecError(Throwable pEx)
focal_class.identifier: constructExecError
focal_class.modifiers: private
focal_class.parameters: (Throwable pEx)
focal_class.return: ExecuteError
focal_class.signature: ExecuteError constructExecError(Throwable pEx)
focal_method.body: @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
  	@ExceptionHandler(Throwable.class)
  	@ResponseBody
  	public MultiExecuteOutput exception(Throwable pEx){
  		ExecuteOutput<?> resp = new ExecuteOutput<>();
  		ExecuteError execError = constructExecError(pEx);
  		String message = constructMessage(execError);
  		
  		if (Optional.ofNullable(exceptions).isPresent()) {			
  			if (exceptions.containsKey(pEx.getClass())) {
  				message = constructMessage(exceptions.get(pEx.getClass()), execError);
  			} else {
  				Optional<Class<?>> hierarchyclass = exceptions.keySet()
  						.stream()
  						.filter(c -> null != c && c.isAssignableFrom(pEx.getClass()))
  						.findFirst();
  			
  				if (hierarchyclass.isPresent()) 
  					message = constructMessage(exceptions.get(hierarchyclass.get()), execError);
  			}
  		} 
  		execError.setMessage(message);
  		logError(execError, pEx);
  		resp.setExecuteException(execError);
  		return defaultInterceptor.handleResponse(resp);		
  	}
focal_method.class_method_signature: WebActionControllerAdvice.exception(Throwable pEx)
focal_method.full_signature: @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR) @ExceptionHandler(Throwable.class) @ResponseBody public MultiExecuteOutput exception(Throwable pEx)
focal_method.identifier: exception
focal_method.invocations: constructExecError constructMessage isPresent ofNullable containsKey getClass constructMessage get getClass findFirst filter stream keySet isAssignableFrom getClass isPresent constructMessage get get setMessage logError setExecuteException handleResponse
focal_method.modifiers: @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR) @ExceptionHandler(Throwable.class) @ResponseBody public
focal_method.parameters: (Throwable pEx)
focal_method.return: MultiExecuteOutput
focal_method.signature: MultiExecuteOutput exception(Throwable pEx)