public void testAddTestCasesWithSharedFiles() throws Exception {
String testCaseIdOne = "1";
String testCaseIdTwo = "2";
String testCaseIdThree = "3";
FileInfo one = new FileInfo("foo.js", 1, -1, false, false, null, "foo.js");
FileInfo two = new FileInfo("foo.js", 1, -1, false, false, "foo2", "foo.js");
JstdTestCaseStore store = new JstdTestCaseStore();
JstdTestCase testCaseOne =
new JstdTestCase(Lists.<FileInfo>newArrayList(), Lists.<FileInfo>newArrayList(one),
Lists.<FileInfo>newArrayList(), testCaseIdOne);
JstdTestCase testCaseTwo =
new JstdTestCase(Lists.<FileInfo>newArrayList(), Lists.<FileInfo>newArrayList(two),
Lists.<FileInfo>newArrayList(), testCaseIdTwo);
JstdTestCase testCaseThree =
new JstdTestCase(Lists.<FileInfo>newArrayList(), Lists.<FileInfo>newArrayList(one),
Lists.<FileInfo>newArrayList(), testCaseIdThree);
store.addCase(testCaseOne);
assertTrue(store.getCases().contains(testCaseOne));
store.addCase(testCaseTwo);
assertTrue(store.getCases().contains(testCaseTwo));
store.addCase(testCaseOne);
store.addCase(testCaseThree);
assertEquals("The data will be updated for test case one", two.getData(),
store.getCase(testCaseIdOne).getTests().get(0).getData());
assertEquals("The data will be updated for test case three", two.getData(),
store.getCase(testCaseIdThree).getTests().get(0).getData());
}