@Test public void retrievesExceptionMapperFromEmbeddedProviderBinderByExceptionTypeWhenRequiredExceptionMapperIsNotAvailableInApplicationProviderBinder() { ExceptionMapper<RuntimeException> exceptionMapper = mock(ExceptionMapper.class); when(embeddedProviders.getExceptionMapper(RuntimeException.class)).thenReturn(exceptionMapper); assertSame(exceptionMapper, applicationProviders.getExceptionMapper(RuntimeException.class)); }
@Override public <T extends Throwable> ExceptionMapper<T> getExceptionMapper(Class<T> type) { ExceptionMapper<T> exceptionMapper = doGetExceptionMapper(type); if (exceptionMapper == null) { exceptionMapper = getDefaults().getExceptionMapper(type); } return exceptionMapper; }
ApplicationProviderBinder extends ProviderBinder { @Override public <T extends Throwable> ExceptionMapper<T> getExceptionMapper(Class<T> type) { ExceptionMapper<T> exceptionMapper = doGetExceptionMapper(type); if (exceptionMapper == null) { exceptionMapper = getDefaults().getExceptionMapper(type); } return exceptionMapper; } }
ApplicationProviderBinder extends ProviderBinder { @Override public <T extends Throwable> ExceptionMapper<T> getExceptionMapper(Class<T> type) { ExceptionMapper<T> exceptionMapper = doGetExceptionMapper(type); if (exceptionMapper == null) { exceptionMapper = getDefaults().getExceptionMapper(type); } return exceptionMapper; }  }
ApplicationProviderBinder extends ProviderBinder { @Override public <T extends Throwable> ExceptionMapper<T> getExceptionMapper(Class<T> type) { ExceptionMapper<T> exceptionMapper = doGetExceptionMapper(type); if (exceptionMapper == null) { exceptionMapper = getDefaults().getExceptionMapper(type); } return exceptionMapper; }  @Override List<MediaType> getAcceptableWriterMediaTypes(Class<?> type, Type genericType, Annotation[] annotations); @Override ContextResolver<T> getContextResolver(Class<T> contextType, MediaType mediaType); @Override ExceptionMapper<T> getExceptionMapper(Class<T> type); @Override MessageBodyReader<T> getMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType); @Override MessageBodyWriter<T> getMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType); @Override List<MethodInvokerFilter> getMethodInvokerFilters(String path); @Override List<RequestFilter> getRequestFilters(String path); @Override List<ResponseFilter> getResponseFilters(String path); }
ApplicationProviderBinder extends ProviderBinder { @Override public <T extends Throwable> ExceptionMapper<T> getExceptionMapper(Class<T> type) { ExceptionMapper<T> exceptionMapper = doGetExceptionMapper(type); if (exceptionMapper == null) { exceptionMapper = getDefaults().getExceptionMapper(type); } return exceptionMapper; }  @Override List<MediaType> getAcceptableWriterMediaTypes(Class<?> type, Type genericType, Annotation[] annotations); @Override ContextResolver<T> getContextResolver(Class<T> contextType, MediaType mediaType); @Override ExceptionMapper<T> getExceptionMapper(Class<T> type); @Override MessageBodyReader<T> getMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType); @Override MessageBodyWriter<T> getMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType); @Override List<MethodInvokerFilter> getMethodInvokerFilters(String path); @Override List<RequestFilter> getRequestFilters(String path); @Override List<ResponseFilter> getResponseFilters(String path);  }