import org.junit.runner.notification.RunNotifier;
public class OldTestClassAdaptingListenerTest {
@Test
public void addFailureDelegatesToNotifier() {
Result result = new Result();
RunListener listener = result.createListener();
RunNotifier notifier = new RunNotifier();
notifier.addFirstListener(listener);
TestCase testCase = new TestCase() {
};
TestListener adaptingListener = new JUnit38ClassRunner(testCase)
.createAdaptingListener(notifier);
adaptingListener.addFailure(testCase, new AssertionFailedError());
assertEquals(1, result.getFailureCount());
}