LocalSymbolBuilderFactory { public static ILocalSymbolBuilder getLocalSymbolBuilder( Exchange exchange ) { if( exchange == Exchange.HKFE ) { return new HKFELocalSymbolBuilder(); } else if( exchange == Exchange.ECBOT ) { return new CBOTLocalSymbolBuilder(); } else if( exchange == Exchange.OSE ) { return new OSELocalSymbolBuilder(); } else { return new DefaultLocalSymbolBuilder(); } }  static ILocalSymbolBuilder getLocalSymbolBuilder( Exchange exchange );  }
@Test public void testGetLocalSymbolBuilder() { assertTrue( LocalSymbolBuilderFactory.getLocalSymbolBuilder(Exchange.HKFE) instanceof HKFELocalSymbolBuilder ); assertTrue( LocalSymbolBuilderFactory.getLocalSymbolBuilder(Exchange.ECBOT) instanceof CBOTLocalSymbolBuilder ); assertTrue( LocalSymbolBuilderFactory.getLocalSymbolBuilder(Exchange.GLOBEX) instanceof DefaultLocalSymbolBuilder ); assertTrue( LocalSymbolBuilderFactory.getLocalSymbolBuilder(Exchange.OSE) instanceof OSELocalSymbolBuilder ); }