NotSupportedExceptionMapper extends
    CandlepinExceptionMapper implements
    ExceptionMapper<NotSupportedException> { @Override public Response toResponse(NotSupportedException exception) { return getDefaultBuilder(exception, Response.Status.UNSUPPORTED_MEDIA_TYPE, determineBestMediaType()).build(); }  @Override Response toResponse(NotSupportedException exception);  }
@Test public void handleException() { NotSupportedException nae = new NotSupportedException("unacceptable"); NotSupportedExceptionMapper naem = injector.getInstance(NotSupportedExceptionMapper.class); Response r = naem.toResponse(nae); assertEquals(415, r.getStatus()); verifyMessage(r, rtmsg("unacceptable")); }