OutboundDocSubmissionDeferredRequestFactory { public OrchestrationContextBuilder createOrchestrationContextBuilder(NhincConstants.GATEWAY_API_LEVEL apiLevel) { switch (apiLevel) { case LEVEL_g0: return new OutboundDocSubmissionDeferredRequestOrchestrationContextBuilder_g0(); case LEVEL_g1: return new OutboundDocSubmissionDeferredRequestOrchestrationContextBuilder_g1(); default: return new OutboundDocSubmissionDeferredRequestOrchestrationContextBuilder_g0(); } } private  OutboundDocSubmissionDeferredRequestFactory(); OrchestrationContextBuilder createOrchestrationContextBuilder(NhincConstants.GATEWAY_API_LEVEL apiLevel); static OutboundDocSubmissionDeferredRequestFactory getInstance();  }
@Test public void testCreateOrchestrationContextBuilder() { OutboundDocSubmissionDeferredRequestFactory factory = OutboundDocSubmissionDeferredRequestFactory.getInstance(); OrchestrationContextBuilder contextBuilder = factory.createOrchestrationContextBuilder(NhincConstants.GATEWAY_API_LEVEL.LEVEL_g0); assertTrue(contextBuilder instanceof OutboundDocSubmissionDeferredRequestOrchestrationContextBuilder_g0); contextBuilder = factory.createOrchestrationContextBuilder(NhincConstants.GATEWAY_API_LEVEL.LEVEL_g1); assertTrue(contextBuilder instanceof OutboundDocSubmissionDeferredRequestOrchestrationContextBuilder_g1); }