### Question:
DropwizardModule extends AbstractModule { @Provides @Singleton @Graceland MetricRegistry provideMetricRegistry() { Preconditions.checkState(environment != null, "Environment has not been set."); return environment.metrics(); }  void setup(PlatformConfiguration config, Environment env);  }### Answer:
@Test(expected = IllegalStateException.class) public void must_set_environment_before_providing_metric_registry() { dropwizardModule.provideMetricRegistry(); }