ctx.refresh();
assertEnvironmentAwareInvoked(ctx, prodEnv);
assertThat("should have prod bean", ctx.containsBean(PROD_BEAN_NAME), is(true));
assertThat("should not have dev bean", ctx.containsBean(DEV_BEAN_NAME), is(false));
assertThat("should not have transitive bean", ctx.containsBean(TRANSITIVE_BEAN_NAME), is(false));
}
@Test
public void mostSpecificDerivedClassDrivesEnvironment_withDerivedDevEnvAndDerivedDevConfigClass() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();