@@ -0,0 +1,2344 @@
+package com.nesscomputing.httpclient.response;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.InputStream;%0Aimport java.util.List;%0A%0Aimport com.fasterxml.jackson.core.type.TypeReference;%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0Aimport com.google.common.base.Charsets;%0Aimport com.google.common.collect.ImmutableList;%0Aimport com.google.common.collect.Lists;%0A%0Aimport org.easymock.EasyMock;%0Aimport org.junit.Test;%0A%0Aimport com.nesscomputing.callback.Callback;%0Aimport com.nesscomputing.callback.CallbackCollector;%0Aimport com.nesscomputing.callback.CallbackRefusedException;%0Aimport com.nesscomputing.httpclient.HttpClientResponse;%0A%0Apublic class TestStreamedJsonContentConverter%0A%7B%0A    public static final String TEST_JSON = %22%7B%5C%22results%5C%22: %5B1, 2, 3, 4, 5, 6, 7, 8, 9, 10%5D, %5C%22success%5C%22:true%7D%22;%0A%0A    private final ObjectMapper mapper = new ObjectMapper();%0A%0A    private static InputStream inputStream()%0A    %7B%0A        return new ByteArrayInputStream(TEST_JSON.getBytes(Charsets.UTF_8));%0A    %7D%0A    private static HttpClientResponse response(int status)%0A    %7B%0A        HttpClientResponse response = EasyMock.createMock(HttpClientResponse.class);%0A        EasyMock.expect(response.getStatusCode()).andReturn(status);%0A        EasyMock.replay(response);%0A        return response;%0A    %7D%0A%0A    @Test%0A    public void testSuccess() throws Exception%0A    %7B%0A        CallbackCollector%3CInteger%3E callback = new CallbackCollector%3C%3E();%0A        new StreamedJsonContentConverter%3C%3E(mapper, callback, new TypeReference%3CInteger%3E() %7B%7D).convert(response(200), inputStream());%0A%0A        assertEquals(ImmutableList.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), callback.getItems());%0A    %7D%0A%0A    @Test%0A    public void testRefuse() throws Exception%0A    %7B%0A        final List%3CInteger%3E items = Lists.newArrayList();%0A        Callback%3CInteger%3E callback = new Callback%3CInteger%3E() %7B%0A            @Override%0A            public void call(Integer item) throws Exception%0A            %7B%0A                if (item %3E= 5) %7B%0A                    throw new CallbackRefusedException();%0A                %7D%0A%0A                items.add(item);%0A            %7D%0A        %7D;%0A        new StreamedJsonContentConverter%3C%3E(mapper, callback, new TypeReference%3CInteger%3E() %7B%7D).convert(response(200), inputStream());%0A%0A        assertEquals(ImmutableList.of(1, 2, 3, 4), items);%0A    %7D%0A%7D%0A

Add a simple StreamedJsonContentConverter test case.