Change ContextHierarchyDirtiesContextTests to obtain beans whilst the ApplicationContext is still open, rather than trying to obtain them after the context has been closed.
Change ContextHierarchyDirtiesContextTests to obtain beans whilst the ApplicationContext is still open, rather than trying to obtain them after the context has been closed.