/*
 * Copyright 2013, 2014 Deutsche Nationalbibliothek
 *
 * Licensed under the Apache License, Version 2.0 the "License";
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.culturegraph.mf.flux;

import java.io.PrintStream;

import org.apache.commons.io.output.NullOutputStream;
import org.culturegraph.mf.flux.parser.FluxProgramm;
import org.junit.Test;

/**
 * Tests {@link FluxProgramm}
 *
 * @author markus geipel
 *
 */

public final class FluxProgrammTest {
	@Test
	public void testCommandRegistration() {
		// all commands must properly load to print the help
		FluxProgramm.printHelp(new PrintStream(new NullOutputStream()));

	}
}

@@ -659,20 +659,49 @@
 java.io.
-Prin
+IOException;%0Aimport java.io.Outpu
 tStream;
@@ -705,54 +705,27 @@
 am;%0A
-%0A
 import 
-org.apache.commons.io.output.NullOutpu
+java.io.Prin
 tStr
@@ -725,24 +725,25 @@
 rintStream;%0A
+%0A
 import org.c
@@ -915,16 +915,17 @@
 mTest %7B%0A
+%0A
 %09@Test%0A%09
@@ -1044,16 +1044,87 @@
 intHelp(
+discardOutput());%0A%0A%09%7D%0A%0A%09private PrintStream discardOutput() %7B%0A%09%09return 
 new Prin
@@ -1139,12 +1139,8 @@
 new 
-Null
 Outp
@@ -1149,18 +1149,122 @@
 Stream()
-)
+ %7B%0A%09%09%09@Override%0A%09%09%09public void write(int b) throws IOException %7B%0A%09%09%09%09// Do not write any output.%0A%09%09%09%7D%0A%09%09%7D
 );%0A
-%0A
 %09%7D%0A
+%0A
 %7D%0A

Replace NullOutputStream with inline implementation