@Test
  public void findsResourceClassesInPackageAndSubpackage() {
    final DropwizardResourceConfig rc = DropwizardResourceConfig.forTesting(new MetricRegistry());
    rc.init(new PackageNamesScanner(new String[] {getClass().getPackage().getName()}));

    assertThat(rc.getRootResourceClasses()).contains(DummyResource.class, TestResource.class);
  }
  @Test
  public void testGetEndpointsInfo() {
    final DropwizardResourceConfig rc = DropwizardResourceConfig.forTesting(new MetricRegistry());
    rc.init(new PackageNamesScanner(new String[] {DummyResource.class.getPackage().getName()}));

    assertThat(rc.getEndpointsInfo())
        .isEqualTo(
            "The following paths were found for the configured resources:\n"
                + "\n"
                + "    GET     / (io.dropwizard.jersey.dummy.DummyResource)"
                + "\n");
  }
 @Override
 protected Application configure() {
   return DropwizardResourceConfig.forTesting(new MetricRegistry()).register(DummyResource.class);
 }