@Test public void assessmentItemFactoryVSATest() { IAssessmentHandler handler = AssessmentItemFactory.getHandler("reference"); Assert.assertNotNull(handler); Assert.assertTrue(handler instanceof DefaultHandler); }
public static IAssessmentHandler getHandler(String questionType) { IAssessmentHandler manager = null; switch (questionType) { case "mcq": manager = MCQHandler.getInstance(); break; case "reference": manager = DefaultHandler.getInstance(); break; default: break; } return manager; }
AssessmentItemFactory { public static IAssessmentHandler getHandler(String questionType) { IAssessmentHandler manager = null; switch (questionType) { case "mcq": manager = MCQHandler.getInstance(); break; case "reference": manager = DefaultHandler.getInstance(); break; default: break; } return manager; } }
AssessmentItemFactory { public static IAssessmentHandler getHandler(String questionType) { IAssessmentHandler manager = null; switch (questionType) { case "mcq": manager = MCQHandler.getInstance(); break; case "reference": manager = DefaultHandler.getInstance(); break; default: break; } return manager; }  }
AssessmentItemFactory { public static IAssessmentHandler getHandler(String questionType) { IAssessmentHandler manager = null; switch (questionType) { case "mcq": manager = MCQHandler.getInstance(); break; case "reference": manager = DefaultHandler.getInstance(); break; default: break; } return manager; }  static IAssessmentHandler getHandler(String questionType); }
AssessmentItemFactory { public static IAssessmentHandler getHandler(String questionType) { IAssessmentHandler manager = null; switch (questionType) { case "mcq": manager = MCQHandler.getInstance(); break; case "reference": manager = DefaultHandler.getInstance(); break; default: break; } return manager; }  static IAssessmentHandler getHandler(String questionType);  }