use of io.crnk.test.mock.TestExceptionMapper in project crnk-framework by crnk-project.
the class GuiceServiceDiscoveryTest method exceptionMapperDiscovery.
@Test
public void exceptionMapperDiscovery() {
CrnkBoot boot = new CrnkBoot();
boot.setServiceDiscovery(discovery);
boot.boot();
Optional<JsonApiExceptionMapper> mapper = boot.getExceptionMapperRegistry().findMapperFor(TestException.class);
Assert.assertTrue(mapper.isPresent());
Assert.assertTrue(mapper.get() instanceof TestExceptionMapper);
}
Aggregations