Before, we used ConfigurableApplicationContext or BeanFactory eventhough we already had a reference to ConfigurableApplicationContext. This uses the latter consistently, avoiding a state condition that caused more code. This also corrects some misnamed tests and adjusts them to verify only what they are responsible for.