Source:
<code>public void getCardsByCurrencyShouldReturnTheListOfCardsWithCurrency() throws Exception { final AtomicReference<List<Card>> bodyRefResponse = new AtomicReference<>(); final AtomicReference<Request> bodyRefRequest = new AtomicReference<>(); final CountDownLatch latch = new CountDownLatch(1); User mockedUserResponse = Fixtures.loadUser(); BitreserveRestAdapter mockRestAdapter = new BitreserveRestAdapter("foobar"); mockRestAdapter.setAdapter(new RestAdapter.Builder().setEndpoint(GlobalConfigurations.SERVER_URL).setClient(new Client() { @Override public Response execute(Request request) throws IOException { String responseString = "[ { \"id\": \"FOOBAR\", \"currency\": \"USD\" }, { \"id\": \"FOOBIZ\", \"currency\": \"BTC\" } ]"; bodyRefRequest.set(request); return new Response("some/url", 200, "reason", new ArrayList<retrofit.client.Header>() {{ <START> add(new retrofit.client.Header("foo", "bar")); <END> }}, new TypedByteArray("application/json", responseString.getBytes())); } }).build()); mockedUserResponse.setBitreserveRestAdapter(mockRestAdapter); mockedUserResponse.getCardsByCurrency("BTC").then(new PromiseAction<List<Card>>() { @Override public void call(List<Card> cards) { bodyRefResponse.set(cards); latch.countDown(); } }).fail(new PromiseAction<Exception>() { @Override public void call(Exception e) { latch.countDown(); } }); latch.await(); List<Card> cards = bodyRefResponse.get(); Request request = bodyRefRequest.get(); Assert.assertEquals(request.getMethod(), "GET"); Assert.assertEquals(request.getUrl(), "<LINK_0>"); Assert.assertEquals(cards.size(), 1); Assert.assertEquals(cards.get(0).getId(), "FOOBIZ"); }</code><technical_language>This test need this header, right? If so, please remove it. Also, a more tests need header. Please update them</technical_language>

Target:
public void getCardsByCurrencyShouldReturnTheListOfCardsWithCurrency() throws Exception { final AtomicReference<List<Card>> bodyRefResponse = new AtomicReference<>(); final AtomicReference<Request> bodyRefRequest = new AtomicReference<>(); final CountDownLatch latch = new CountDownLatch(1); User mockedUserResponse = Fixtures.loadUser(); BitreserveRestAdapter mockRestAdapter = new BitreserveRestAdapter("foobar"); mockRestAdapter.setAdapter(new RestAdapter.Builder().setEndpoint(GlobalConfigurations.SERVER_URL).setClient(new Client() { @Override public Response execute(Request request) throws IOException { String responseString = "[ { \"id\": \"FOOBAR\", \"currency\": \"USD\" }, { \"id\": \"FOOBIZ\", \"currency\": \"BTC\" } ]"; bodyRefRequest.set(request); return new Response("some/url", 200, "reason", new ArrayList<retrofit.client.Header>(), new TypedByteArray("application/json", responseString.getBytes())); } }).build()); mockedUserResponse.setBitreserveRestAdapter(mockRestAdapter); mockedUserResponse.getCardsByCurrency("BTC").then(new PromiseAction<List<Card>>() { @Override public void call(List<Card> cards) { bodyRefResponse.set(cards); latch.countDown(); } }).fail(new PromiseAction<Exception>() { @Override public void call(Exception e) { latch.countDown(); } }); latch.await(); List<Card> cards = bodyRefResponse.get(); Request request = bodyRefRequest.get(); Assert.assertEquals(request.getMethod(), "GET"); Assert.assertEquals(request.getUrl(), "<LINK_0>"); Assert.assertEquals(cards.size(), 1); Assert.assertEquals(cards.get(0).getId(), "FOOBIZ"); }