use of com.emc.storageos.svcs.errorhandling.mappers.ServiceCodeExceptionMapper in project coprhd-controller by CoprHD.
the class ErrorHandlingTest method setupServer.
@BeforeClass
public static void setupServer() throws Exception {
_server = new Server(port);
// AuthN servlet filters
ServletContextHandler rootHandler = new ServletContextHandler();
rootHandler.setContextPath("/");
_server.setHandler(rootHandler);
final StorageApplication application = new StorageApplication();
final Set<Object> resources = new HashSet<Object>();
resources.add(new ErrorHandlingTestResource());
resources.add(new ServiceCodeExceptionMapper());
application.setResource(resources);
final ResourceConfig config = new DefaultResourceConfig();
config.add(application);
rootHandler.addServlet(new ServletHolder(new ServletContainer(config)), "/*");
_server.start();
}
Aggregations