getExceptionHandler()

4

tests

0

failures

0

ignored

0.008s

duration

100%

successful

Tests

Test Method name Duration Result
매 조회시 캐싱되어 같은 인스턴스를 반환한다 cachingWorks() 0.001s passed
가장 구체적인 핸들러를 선택한다 (IOException vs Exception) choosesMostSpecific() 0.005s passed
하위 예외(FileNotFoundException)도 상위(IOException) 핸들러로 매핑 inheritsHierarchy() 0.001s passed
등록된 핸들러가 없으면 Optional.empty() noHandlerFound() 0.001s passed

Standard output

Found @ControllerAdvice: sprout.mvc.advice.ControllerAdviceRegistryTest$IoAdvice
  Registered @ExceptionHandler: handleIo for types: IOException
Found @ControllerAdvice: sprout.mvc.advice.ControllerAdviceRegistryTest$GlobalAdvice
  Registered @ExceptionHandler: handleGeneric for types: Exception
Found @ControllerAdvice: sprout.mvc.advice.ControllerAdviceRegistryTest$IoAdvice
  Registered @ExceptionHandler: handleIo for types: IOException
Found @ControllerAdvice: sprout.mvc.advice.ControllerAdviceRegistryTest$GlobalAdvice
  Registered @ExceptionHandler: handleGeneric for types: Exception
Found @ControllerAdvice: sprout.mvc.advice.ControllerAdviceRegistryTest$IoAdvice
  Registered @ExceptionHandler: handleIo for types: IOException
Found @ControllerAdvice: sprout.mvc.advice.ControllerAdviceRegistryTest$GlobalAdvice
  Registered @ExceptionHandler: handleGeneric for types: Exception
Found @ControllerAdvice: sprout.mvc.advice.ControllerAdviceRegistryTest$IoAdvice
  Registered @ExceptionHandler: handleIo for types: IOException
Found @ControllerAdvice: sprout.mvc.advice.ControllerAdviceRegistryTest$GlobalAdvice
  Registered @ExceptionHandler: handleGeneric for types: Exception