RunIndexWrapper { public Optional<Test> getTest(String testName) { return objectToRunWrapper.getRealSuite().getTest(testName); } RunIndexWrapper(Run<T> objectToRunWrapper); static void cleanUrlFromExecutionData(Url url); Optional<Url> getTestUrl(String testName, final String urlName); Optional<Test> getTest(String testName); Run<T> get(); abstract List<UrlPacket> getUrlPackets(); abstract int countUrls(); @Override String toString();  }
@Test public void getTest_whenSuiteHasNotTest_expectNull() { when(suite.getTest("testName")).thenReturn(null); when(objectToRunWrapper.getRealSuite()).thenReturn(suite); assertNull(runIndexWrapper.getTest("testName")); }
@Test public void getTest_whenSuiteHasTest_expectTest() { when(suite.getTest("testName")).thenReturn(test); assertThat(runIndexWrapper.getTest("testName"), is(test)); }