DropwizardResourceConfig config = DropwizardResourceConfig.forTesting(new MetricRegistry());
for (Class<?> provider : providers) {
config.register(provider);
}
for (Map.Entry<String, Object> property : properties.entrySet()) {
config.property(property.getKey(), property.getValue());
}
config.register(new JacksonMessageBodyProvider(mapper, validator));
for (Object singleton : singletons)
config.register(singleton);
return config;