/*
 * Mutability Detector
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 *
 * Further licensing information for this project can be found in 
 * 		license/LICENSE.txt
 */

package org.mutabilitydetector.cli;

import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;

import org.junit.Ignore;
import org.junit.Test;

import com.google.classpath.ClassPathFactory;

public class NullPointerExceptionAnalysingRtJar {

    private final PrintStream errorStream = new PrintStream(new OutputStream() {
        @Override
        public void write(int b) throws IOException {
            // suppress output in tests
        }
    });

    @Ignore
    @Test
    public void checkNullPointerExceptionIsNotThrown() {
        String rtJarPath = System.getProperty("java.home") + "/lib/rt.jar";
        BatchAnalysisOptions options = new CommandLineOptions(errorStream, "-cp", rtJarPath);
        new RunMutabilityDetector(new ClassPathFactory().createFromPath(rtJarPath), options).run();
    }

}

@@ -1093,12 +1093,348 @@
 );%0A    %7D
+%0A    %0A    @Ignore%0A    @Test%0A    public void checkNullPointerExceptionIsNotThrownOnAbritaryCodebase() %7B%0A        String rtJarPath = %22...%22;%0A        BatchAnalysisOptions options = new CommandLineOptions(errorStream, %22-cp%22, rtJarPath);%0A        new RunMutabilityDetector(new ClassPathFactory().createFromPath(rtJarPath), options).run();%0A    %7D
 %0A%0A%7D%0A

Add convenience test for running against a filesystem codebase.