@Test(expected = IllegalArgumentException.class) public void testExchangeAdapterThrowsExceptionIfClientIdConfigIsMissing() { PowerMock.reset(authenticationConfig); expect(authenticationConfig.getItem("client-id")).andReturn(null); expect(authenticationConfig.getItem("key")).andReturn("your_client_key"); expect(authenticationConfig.getItem("secret")).andReturn("your_client_secret"); PowerMock.replayAll(); final ExchangeAdapter exchangeAdapter = new BitstampExchangeAdapter(); exchangeAdapter.init(exchangeConfig); PowerMock.verifyAll(); }
@Override public void init(ExchangeConfig config) { LOG.info(() -> "About to initialise Bitstamp ExchangeConfig: " + config); setAuthenticationConfig(config); setNetworkConfig(config); nonce = System.currentTimeMillis() / 1000; initSecureMessageLayer(); initGson(); }
BitstampExchangeAdapter extends AbstractExchangeAdapter implements ExchangeAdapter { @Override public void init(ExchangeConfig config) { LOG.info(() -> "About to initialise Bitstamp ExchangeConfig: " + config); setAuthenticationConfig(config); setNetworkConfig(config); nonce = System.currentTimeMillis() / 1000; initSecureMessageLayer(); initGson(); } }
BitstampExchangeAdapter extends AbstractExchangeAdapter implements ExchangeAdapter { @Override public void init(ExchangeConfig config) { LOG.info(() -> "About to initialise Bitstamp ExchangeConfig: " + config); setAuthenticationConfig(config); setNetworkConfig(config); nonce = System.currentTimeMillis() / 1000; initSecureMessageLayer(); initGson(); }  }
BitstampExchangeAdapter extends AbstractExchangeAdapter implements ExchangeAdapter { @Override public void init(ExchangeConfig config) { LOG.info(() -> "About to initialise Bitstamp ExchangeConfig: " + config); setAuthenticationConfig(config); setNetworkConfig(config); nonce = System.currentTimeMillis() / 1000; initSecureMessageLayer(); initGson(); }  @Override void init(ExchangeConfig config); @Override MarketOrderBook getMarketOrders(String marketId); @Override List<OpenOrder> getYourOpenOrders(String marketId); @Override String createOrder(
      String marketId, OrderType orderType, BigDecimal quantity, BigDecimal price); @Override boolean cancelOrder(String orderId, String marketIdNotNeeded); @Override BigDecimal getLatestMarketPrice(String marketId); @Override BalanceInfo getBalanceInfo(); @Override BigDecimal getPercentageOfBuyOrderTakenForExchangeFee(String marketId); @Override BigDecimal getPercentageOfSellOrderTakenForExchangeFee(String marketId); @Override String getImplName(); @Override Ticker getTicker(String marketId); }
BitstampExchangeAdapter extends AbstractExchangeAdapter implements ExchangeAdapter { @Override public void init(ExchangeConfig config) { LOG.info(() -> "About to initialise Bitstamp ExchangeConfig: " + config); setAuthenticationConfig(config); setNetworkConfig(config); nonce = System.currentTimeMillis() / 1000; initSecureMessageLayer(); initGson(); }  @Override void init(ExchangeConfig config); @Override MarketOrderBook getMarketOrders(String marketId); @Override List<OpenOrder> getYourOpenOrders(String marketId); @Override String createOrder(
      String marketId, OrderType orderType, BigDecimal quantity, BigDecimal price); @Override boolean cancelOrder(String orderId, String marketIdNotNeeded); @Override BigDecimal getLatestMarketPrice(String marketId); @Override BalanceInfo getBalanceInfo(); @Override BigDecimal getPercentageOfBuyOrderTakenForExchangeFee(String marketId); @Override BigDecimal getPercentageOfSellOrderTakenForExchangeFee(String marketId); @Override String getImplName(); @Override Ticker getTicker(String marketId);  }