@Test public void buildsAPingResource() throws Exception { application.run(config, environment); verify(jersey).register(isA(PingResource.class)); }
@Override public void run(final NotificationConfiguration configuration, final Environment environment) throws Exception { environment.getObjectMapper().configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); environment.jersey().register(NotificationExceptionMapper.class); environment.jersey().register(CharsetUtf8Filter.class); environment.jersey().register(RequestIdFilter.class); environment.jersey().register(RuntimeFilter.class); environment.jersey().register(WebSecurityFilter.class); final RiakClient client = configuration.getRiak().build(); final RuleStore ruleStore = getRuleStore(client, configuration); final CursorStore cursorStore = getCursorStore(client, configuration); final NotificationStore store = getNotificationStore(client, configuration); environment.lifecycle().manage(new CursorStoreManager(cursorStore)); environment.lifecycle().manage(new NotificationStoreManager(store)); environment.jersey().register(new NotificationResource(store)); environment.jersey().register(new RuleResource(ruleStore)); environment.jersey().register(new PingResource()); environment.jersey().register(new VersionResource()); }
NotificationApplication extends Application<NotificationConfiguration> { @Override public void run(final NotificationConfiguration configuration, final Environment environment) throws Exception { environment.getObjectMapper().configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); environment.jersey().register(NotificationExceptionMapper.class); environment.jersey().register(CharsetUtf8Filter.class); environment.jersey().register(RequestIdFilter.class); environment.jersey().register(RuntimeFilter.class); environment.jersey().register(WebSecurityFilter.class); final RiakClient client = configuration.getRiak().build(); final RuleStore ruleStore = getRuleStore(client, configuration); final CursorStore cursorStore = getCursorStore(client, configuration); final NotificationStore store = getNotificationStore(client, configuration); environment.lifecycle().manage(new CursorStoreManager(cursorStore)); environment.lifecycle().manage(new NotificationStoreManager(store)); environment.jersey().register(new NotificationResource(store)); environment.jersey().register(new RuleResource(ruleStore)); environment.jersey().register(new PingResource()); environment.jersey().register(new VersionResource()); } }
NotificationApplication extends Application<NotificationConfiguration> { @Override public void run(final NotificationConfiguration configuration, final Environment environment) throws Exception { environment.getObjectMapper().configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); environment.jersey().register(NotificationExceptionMapper.class); environment.jersey().register(CharsetUtf8Filter.class); environment.jersey().register(RequestIdFilter.class); environment.jersey().register(RuntimeFilter.class); environment.jersey().register(WebSecurityFilter.class); final RiakClient client = configuration.getRiak().build(); final RuleStore ruleStore = getRuleStore(client, configuration); final CursorStore cursorStore = getCursorStore(client, configuration); final NotificationStore store = getNotificationStore(client, configuration); environment.lifecycle().manage(new CursorStoreManager(cursorStore)); environment.lifecycle().manage(new NotificationStoreManager(store)); environment.jersey().register(new NotificationResource(store)); environment.jersey().register(new RuleResource(ruleStore)); environment.jersey().register(new PingResource()); environment.jersey().register(new VersionResource()); }  }
NotificationApplication extends Application<NotificationConfiguration> { @Override public void run(final NotificationConfiguration configuration, final Environment environment) throws Exception { environment.getObjectMapper().configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); environment.jersey().register(NotificationExceptionMapper.class); environment.jersey().register(CharsetUtf8Filter.class); environment.jersey().register(RequestIdFilter.class); environment.jersey().register(RuntimeFilter.class); environment.jersey().register(WebSecurityFilter.class); final RiakClient client = configuration.getRiak().build(); final RuleStore ruleStore = getRuleStore(client, configuration); final CursorStore cursorStore = getCursorStore(client, configuration); final NotificationStore store = getNotificationStore(client, configuration); environment.lifecycle().manage(new CursorStoreManager(cursorStore)); environment.lifecycle().manage(new NotificationStoreManager(store)); environment.jersey().register(new NotificationResource(store)); environment.jersey().register(new RuleResource(ruleStore)); environment.jersey().register(new PingResource()); environment.jersey().register(new VersionResource()); }  static void main(final String[] args); @Override String getName(); @Override void initialize(Bootstrap<NotificationConfiguration> bootstrap); @Override void run(final NotificationConfiguration configuration, final Environment environment); }
NotificationApplication extends Application<NotificationConfiguration> { @Override public void run(final NotificationConfiguration configuration, final Environment environment) throws Exception { environment.getObjectMapper().configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); environment.jersey().register(NotificationExceptionMapper.class); environment.jersey().register(CharsetUtf8Filter.class); environment.jersey().register(RequestIdFilter.class); environment.jersey().register(RuntimeFilter.class); environment.jersey().register(WebSecurityFilter.class); final RiakClient client = configuration.getRiak().build(); final RuleStore ruleStore = getRuleStore(client, configuration); final CursorStore cursorStore = getCursorStore(client, configuration); final NotificationStore store = getNotificationStore(client, configuration); environment.lifecycle().manage(new CursorStoreManager(cursorStore)); environment.lifecycle().manage(new NotificationStoreManager(store)); environment.jersey().register(new NotificationResource(store)); environment.jersey().register(new RuleResource(ruleStore)); environment.jersey().register(new PingResource()); environment.jersey().register(new VersionResource()); }  static void main(final String[] args); @Override String getName(); @Override void initialize(Bootstrap<NotificationConfiguration> bootstrap); @Override void run(final NotificationConfiguration configuration, final Environment environment);  }