public void store(TestCaseCoverage testCaseCoverage) {
File testRes = getTestResource(testCaseCoverage.testFile());
File mainRes = getMainResource(testCaseCoverage.coveredFile());
Testable testAbleFile = perspectives.as(MutableTestable.class, mainRes);
if (testAbleFile != null) {
MutableTestPlan testPlan = perspectives.as(MutableTestPlan.class, testRes);
if (testPlan != null) {
for (MutableTestCase mutableTestCase : testPlan.testCasesByName(testCaseCoverage.testName())) {
mutableTestCase.setCoverageBlock(testAbleFile, testCaseCoverage.coveredLines());
}
} else {
throw new IllegalStateException("Unable to get MutableTestPlan perspective from " + testRes);
}