ComponentProxyObjectFactory { protected void refreshConfigurationContext(ApplicationContext appContext) { ((ConfigurableApplicationContext) appContext).refresh(); }    }
@Test public void testRefreshApplicationContext() { try { final ApplicationContext mockContext = context.mock(ApplicationContext.class); ComponentProxyObjectFactory sut = new ComponentProxyObjectFactory() { @Override protected void refreshConfigurationContext(ApplicationContext appContext) { } @Override protected String getConfigFileName() { return ""; } }; sut.refreshConfigurationContext(mockContext); assertTrue(true); } catch (Throwable t) { System.out.println("Error running testRefreshApplicationContext test: " + t.getMessage()); t.printStackTrace(); fail("Error running testRefreshApplicationContext test: " + t.getMessage()); } }