EODSystemProperties { protected TradeOrder.Type getOrderType( String orderType ) { if( "MKT".equalsIgnoreCase(orderType) ) { return Type.MARKET; } else if( "MOC".equalsIgnoreCase(orderType) ) { return Type.MARKET_ON_CLOSE; } else if( "MOO".equalsIgnoreCase(orderType) ) { return Type.MARKET_ON_OPEN; } else { throw new IllegalStateException( "Unknown order.type: " + orderType ); } } protected  EODSystemProperties();  EODSystemProperties(String fileName);  EODSystemProperties(InputStream inputStream); LocalTime getStartTime(); String getTwsHost(); int getTwsPort(); int getTwsClientId(); int getTradeSizeDollars(); Map<String, String> getLongShortTickerMap(); LocalTime getMarketCloseTime(); String getStrategyDirectory(); TradeOrder.Type getEntryOrderType(); Type getExitOrderType(); int getExitSeconds(); LocalTime getExitTime(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testGetOrderType() { assertEquals( TradeOrder.Type.MARKET, systemProps.getOrderType("MKT") ); assertEquals( TradeOrder.Type.MARKET_ON_CLOSE, systemProps.getOrderType("MOC") ); assertEquals( TradeOrder.Type.MARKET_ON_OPEN, systemProps.getOrderType("MOO")); try { systemProps.getOrderType("foo"); fail(); } catch( IllegalStateException ex ) { } }