Response response = new Response();
response.setType(ResponseType.TEST_RESULT.name());
Gson gson = new Gson();
BrowserInfo browser = new BrowserInfo();
browser.setName(browserId);
TestResult testResult = new TestResult(browser, "passed", "passed", "log",
"test.Foo", "Foo", 1f);
List<FileCoverage> expectedFileCoverage =
Arrays.asList(new FileCoverage(-1, Lists.newArrayList(new CoveredLine(1, 1))));
CoverageAccumulator expected = new CoverageAccumulator();
expected.add(browserId, expectedFileCoverage);
testResult.getData().put(CoverageTestResponseStream.COVERAGE_DATA_KEY,
"[[-1,[[1,1]]]]");
response.setResponse(gson.toJson(Arrays.asList(testResult)));
stream.stream(response);
assertEquals(expected, accumulator);