### Question:
BeanLoader { public static <T> T loadBean(Class<T> classDef) { try { logger.trace("load bean '{}' from application context", classDef.getSimpleName()); return getBeanFactory().getBean(classDef); } catch (Exception e) { logger.error("error in BeanLoader", e); throw e; } }  static BaseActionLoader loadBaseActionLoader(); static ScreenActionLoader loadScreenActionLoader(); static TestCaseAction loadTestCaseAction(); static Application loadApplication(String applicationNameOrPath, String resumeOnException); static Environment loadEnvironment(String resumeOnException); static Region loadRegion(String resumeOnException); static Region loadRegionRectangle(int x, int y, int w, int h, String resumeOnException); static T loadBean(Class<T> classDef); static T loadBean(String qualifier, Class<T> classDef); static void releaseContext(); static void refreshContext(); static java.util.Map<String, T> loadMultipleBeans(Class<T> classDef); static String CONTEXT_PATH; }### Answer:
@Test public void testLoadBean() throws Exception { Assert.assertNotNull(BeanLoader.loadBean(SakuliProperties.class)); }
@Test(expectedExceptions = NoSuchBeanDefinitionException.class) public void testLoadBeanException() throws Exception { Assert.assertNotNull(BeanLoader.loadBean("unvalidQualifier", SakuliProperties.class)); }