private MutableTestCase testCase(String fileKey, String fileLongName, int coveredLines) {
Testable testable = mock(Testable.class);
when(testable.component()).thenReturn(new ComponentDto().setKey(fileKey).setLongName(fileLongName));
CoverageBlock block = mock(CoverageBlock.class);
when(block.testable()).thenReturn(testable);
when(block.lines()).thenReturn(Arrays.asList(new Integer[coveredLines]));
MutableTestCase testCase = mock(MutableTestCase.class);
when(testCase.coverageBlocks()).thenReturn(newArrayList(block));
return testCase;
}