}
@Test
public void testReload() {
final ResourceConfig rc = new ResourceConfig(One.class);
Reloader reloader = new Reloader();
rc.registerInstances(reloader);
startServer(rc);
WebTarget r = ClientBuilder.newClient().target(getUri().path("/").build());
assertEquals("one", r.path("one").request().get(String.class));
assertEquals(404, r.path("two").request().get(Response.class).getStatus());
// add Two resource
reloader.reload(new ResourceConfig(One.class, Two.class));
assertEquals("one", r.path("one").request().get(String.class));
assertEquals("two", r.path("two").request().get(String.class));
}