### Question:
JUnitCompatibilityDriverFinder implements DriverFinder { @Override public Driver findTestClassDriver(Class<?> testClass) { if (isJUnit4AnnotatedTest(testClass) || isJUnit4Test(testClass) || isJUnit3Test(testClass)) { return new JUnitCompatibilityDriver(); } else { return DRIVER_NOT_FOUND; } }  @Override Driver findTestClassDriver(Class<?> testClass);  }### Answer:
@Test public void supports_JUnit_3_tests() { Driver driver = finder.findTestClassDriver(JUnit3Test.class); assertThat(driver, is(instanceOf(JUnitCompatibilityDriver.class))); }
@Test public void supports_JUnit_4_tests() { Driver driver = finder.findTestClassDriver(JUnit4Test.class); assertThat(driver, is(instanceOf(JUnitCompatibilityDriver.class))); }
@Test public void supports_RunWith_annotated_JUnit_4_tests() { Driver driver = finder.findTestClassDriver(JUnit4AnnotatedTest.class); assertThat(driver, is(instanceOf(JUnitCompatibilityDriver.class))); }
@Test public void does_not_support_non_JUnit_tests() { Driver driver = finder.findTestClassDriver(NotJUnitTest.class); assertThat(driver, Matchers.is(DriverFinder.DRIVER_NOT_FOUND)); }