### Question:
HitbtcRestService implements ManageOrders, Withdraw, Account { @Override public void cancel(String id) { cfg.getRestTemplate() .exchange( cfg.getRestBase() + ORDERS + id, HttpMethod.DELETE, new HttpEntity<>(signer.restHeaders()), Object.class); }  @Override Optional<OrderDto> get(String id); @Override List<OrderDto> getOpen(TradingCurrency from, TradingCurrency to); @Override void cancel(String id); @Override Map<TradingCurrency, BigDecimal> balances(); @SneakyThrows @Override void withdraw(TradingCurrency currency, BigDecimal amount, String destination); @Override @IgnoreRateLimited String name();  }### Answer:
@Test public void testCancelOrder() { when(restTemplate.exchange( requestCaptor.capture(), eq(HttpMethod.DELETE), entity.capture(), eq(Object.class) )).thenReturn(new ResponseEntity<>(new Object(), HttpStatus.OK)); hitbtcRestService.cancel(ID); assertThat(requestCaptor.getValue()).isEqualTo(BASE + "/order/" + ID); }