InteractiveBrokersBroker extends BaseIBConnectionDelegate implements IBroker { public String getFormattedDate(int hour, int minute, int second) { throw new UnsupportedOperationException("Not supported yet."); } protected  InteractiveBrokersBroker();  InteractiveBrokersBroker(IBSocket ibSocket); @Override void addTimeUpdateListener(TimeUpdatedListener listener); @Override void removeTimeUpdateListener(TimeUpdatedListener listener); @Override boolean isConnected(); @Override void connect(); @Override void disconnect(); @Override void execDetails(int orderId, Contract contract, Execution execution); @Override void nextValidId(int orderId); @Override void openOrder(int orderId, Contract contract, Order order, OrderState orderState); void timeReceived(ZonedDateTime time); @Override void orderStatus(int orderId, String status, int filled, int remaining, double avgFillPrice, int permId, int parentId, double lastFillPrice, int clientId, String whyHeld); @Override void commissionReport(CommissionReport commissionReport); void addOrderEventListener(OrderEventListener listener); void removeOrderEventListener(OrderEventListener listener); void error(Exception e); void error(String str); void error(int id, int errorCode, String errorMsg); void cancelOrder(String idString); void cancelOrder(TradeOrder order); ZonedDateTime getCurrentTime(); String getFormattedDate(int hour, int minute, int second); @Override String getFormattedDate(ZonedDateTime date); @Override synchronized String getNextOrderId(); void placeOrder(TradeOrder order); void aquireLock(); void releaseLock(); ComboTicker buildComboTicker(Ticker ticker1, Ticker ticker2); @Override ComboTicker buildComboTicker(Ticker ticker1, int ratio1, Ticker ticker2, int ratio2); void contractDetailsReceived(ContractDetails details); ContractDetails getContractDetails(Ticker ticker); @Override synchronized TradeOrder requestOrderStatus(String orderId); @Override List<TradeOrder> getOpenOrders(); @Override List<Position> getAllPositions(); @Override void position(String account, Contract contract, int pos, double avgCost); @Override void positionEnd(); void addBrokerErrorListener(BrokerErrorListener listener); void removeBrokerErrorListener(BrokerErrorListener listener); void cancelAndReplaceOrder(String originalOrderId, TradeOrder newOrder);  }
@Test public void testGetFormattedDate() { ZonedDateTime date = ZonedDateTime.of(2015, 10, 5, 13, 30,30, 0, ZoneId.of("America/New_York")); String expectedString = "20151005 13:30:30"; String formattedDate = broker.getFormattedDate(date); assertEquals(expectedString, formattedDate); }