SimulatedExchange extends BaseExchange { @Override public SimulatedTradeService getTradeService() { return (SimulatedTradeService) super.getTradeService(); }  @Override SynchronizedValueFactory<Long> getNonceFactory(); @Override ExchangeSpecification getDefaultExchangeSpecification(); @Override void remoteInit(); @Override SimulatedMarketDataService getMarketDataService(); @Override SimulatedAccountService getAccountService(); @Override SimulatedTradeService getTradeService(); static final String ENGINE_FACTORY_PARAM; static final String ACCOUNT_FACTORY_PARAM; static final String ON_OPERATION_PARAM; }
@Test(expected = ExchangeException.class) public void testInsufficientLiquidityBid() throws IOException { exchange .getTradeService() .placeMarketOrder( new MarketOrder.Builder(BID, BTC_USD).originalAmount(new BigDecimal("250")).build()); }
@Test(expected = ExchangeException.class) public void testInsufficientLiquidityAsk() throws IOException { exchange .getTradeService() .placeMarketOrder( new MarketOrder.Builder(ASK, BTC_USD).originalAmount(new BigDecimal("1002.1")).build()); }
@Test(expected = FundsExceededException.class) public void testInsufficientFundsBid() throws IOException { exchange .getTradeService() .placeMarketOrder( new MarketOrder.Builder(BID, BTC_USD).originalAmount(new BigDecimal("150")).build()); }
@Test(expected = FundsExceededException.class) public void testInsufficientFundsAsk() throws IOException { exchange .getTradeService() .placeMarketOrder( new MarketOrder.Builder(ASK, BTC_USD) .originalAmount(new BigDecimal("1000.01")) .build()); }