use of org.candlepin.common.exceptions.ExceptionMessage in project candlepin by candlepin.
the class JaxRsExceptionResponseBuilderTest method jaxWsRsError.
@Test
public void jaxWsRsError() {
String foo = "javax.ws.rs.SomeThing(\"paramName\") value is 'strVal' for";
Response resp = exceptionBuilder.getResponse(new RuntimeException(foo));
ExceptionMessage e = (ExceptionMessage) resp.getEntity();
assertTrue(exceptionBuilder.canHandle(new RuntimeException(foo)));
assertTrue(e.getDisplayMessage().contains("paramName"));
assertTrue(e.getDisplayMessage().contains("strVal"));
}
Aggregations