// Path: src/main/java/org/harmony_analyser/application/visualizations/DataChartFactory.java
// public class DataChartFactory {
// 	private final String[] ALL_VISUALIZATIONS = new String[] {
// 		"nnls-chroma:chordino-labels",
// 		"qm-vamp-plugins:qm-keydetector",
// 		"chord_analyser:average_chord_complexity_distance",
// 		"chord_analyser:chord_complexity_distance",
// 		"chord_analyser:tps_distance",
// 		"chroma_analyser:simple_difference",
// 		"chroma_analyser:complexity_difference",
// 	};
// 
// 	public String[] getAllVisualizations() {
// 		return ALL_VISUALIZATIONS;
// 	}
// 
// 	public DataChart createDataChart(String analysisKey, VisualizationData visualizationData) {
// 		switch (analysisKey) {
// 			case "nnls-chroma:chordino-labels":
// 			case "qm-vamp-plugins:qm-keydetector":
// 				return new SegmentationDataChart(visualizationData);
// 			case "chord_analyser:average_chord_complexity_distance":
// 				return new AveragesDataChart(visualizationData);
// 			case "chord_analyser:chord_complexity_distance":
// 			case "chroma_analyser:simple_difference":
// 			case "chroma_analyser:complexity_difference":
// 			case "chord_analyser:tps_distance":
// 				return new LineDataChart(visualizationData);
// 			default:
// 				return new EmptyDataChart(VisualizationData.EMPTY_VISUALIZATION_DATA);
// 		}
// 	}
// }
// 
// Path: src/main/java/org/harmony_analyser/jharmonyanalyser/chroma_analyser/Chroma.java
// @SuppressWarnings({"SameParameterValue", "WeakerAccess"})
// 
// public class Chroma {
// 	public final float[] values;
// 
// 	public static final Chroma EMPTY_CHROMA = new Chroma();
// 
// 	/* Exceptions */
// 
// 	public class WrongChromaSize extends Exception {
// 		public WrongChromaSize(String message) {
// 			super(message);
// 		}
// 	}
// 
// 	public Chroma() {
// 		this.values = new float[0];
// 	}
// 
// 	public Chroma(float[] chroma) throws WrongChromaSize {
// 		this.values = new float[Chromanal.CHROMA_LENGTH];
// 		if (chroma.length != Chromanal.CHROMA_LENGTH) {
// 			throw new WrongChromaSize("Wrong Chroma size");
// 		}
// 		System.arraycopy(chroma, 0, values, 0, Chromanal.CHROMA_LENGTH - 1);
// 	}
// 
// 	/* Public / Package methods */
// 
// 	/* Private methods */
// }


import org.harmony_analyser.application.visualizations.DataChartFactory;
import org.harmony_analyser.jharmonyanalyser.chroma_analyser.Chroma;
import org.harmony_analyser.jharmonyanalyser.plugins.*;
import static org.mockito.Mockito.*;
import java.io.*;
import org.junit.*;
import static org.junit.Assert.assertEquals;
		testWavFile = new File(classLoader.getResource("test.wav").getPath());
		testReportFixture = new File(classLoader.getResource("test-printAnalysisFixture.txt").getPath());
	}

	@Test(expected = AudioAnalyser.IncorrectInputException.class)
	public void shouldThrowExceptionOnWrongFile() throws IOException, AudioAnalyser.LoadFailedException, AudioAnalyser.IncorrectInputException, AudioAnalyser.OutputAlreadyExists, Chroma.WrongChromaSize {
		AnalysisFactory analysisFactory = new AnalysisFactory();
		audioAnalyser = new AudioAnalyser(analysisFactory, dataChartFactory);
		audioAnalyser.runAnalysis(wrongInputFile, "chord_analyser:average_chord_complexity_distance", true, false);
	}

	@Test
	public void shouldPrintPlugins() throws IOException {
		String[] availablePlugins = { "test_plugin" };
		String[] visualPlugins = { "visual_plugin" };
		AnalysisFactory analysisFactory = mock(AnalysisFactory.class);
		DataChartFactory dataChartFactory = mock(DataChartFactory.class);
		when(analysisFactory.getAvailablePlugins()).thenReturn(availablePlugins);
		when(dataChartFactory.getAllVisualizations()).thenReturn(visualPlugins);

		audioAnalyser = new AudioAnalyser(analysisFactory, dataChartFactory) {
			public String printInstalledVampPlugins() {
				return "\nINSTALLED_VAMP_PLUGINS_FOLLOW\n";
			}
		};

		BufferedReader readerFixture = new BufferedReader(new FileReader(testReportFixture));
		StringBuilder fixtureString = new StringBuilder();
		String line;
		while ((line = readerFixture.readLine()) != null) { // Check for null is valid
// Path: src/main/java/org/harmony_analyser/application/visualizations/DataChartFactory.java
// public class DataChartFactory {
// 	private final String[] ALL_VISUALIZATIONS = new String[] {
// 		"nnls-chroma:chordino-labels",
// 		"qm-vamp-plugins:qm-keydetector",
// 		"chord_analyser:average_chord_complexity_distance",
// 		"chord_analyser:chord_complexity_distance",
// 		"chord_analyser:tps_distance",
// 		"chroma_analyser:simple_difference",
// 		"chroma_analyser:complexity_difference",
// 	};
// 
// 	public String[] getAllVisualizations() {
// 		return ALL_VISUALIZATIONS;
// 	}
// 
// 	public DataChart createDataChart(String analysisKey, VisualizationData visualizationData) {
// 		switch (analysisKey) {
// 			case "nnls-chroma:chordino-labels":
// 			case "qm-vamp-plugins:qm-keydetector":
// 				return new SegmentationDataChart(visualizationData);
// 			case "chord_analyser:average_chord_complexity_distance":
// 				return new AveragesDataChart(visualizationData);
// 			case "chord_analyser:chord_complexity_distance":
// 			case "chroma_analyser:simple_difference":
// 			case "chroma_analyser:complexity_difference":
// 			case "chord_analyser:tps_distance":
// 				return new LineDataChart(visualizationData);
// 			default:
// 				return new EmptyDataChart(VisualizationData.EMPTY_VISUALIZATION_DATA);
// 		}
// 	}
// }
// 
// Path: src/main/java/org/harmony_analyser/jharmonyanalyser/chroma_analyser/Chroma.java
// @SuppressWarnings({"SameParameterValue", "WeakerAccess"})
// 
// public class Chroma {
// 	public final float[] values;
// 
// 	public static final Chroma EMPTY_CHROMA = new Chroma();
// 
// 	/* Exceptions */
// 
// 	public class WrongChromaSize extends Exception {
// 		public WrongChromaSize(String message) {
// 			super(message);
// 		}
// 	}
// 
// 	public Chroma() {
// 		this.values = new float[0];
// 	}
// 
// 	public Chroma(float[] chroma) throws WrongChromaSize {
// 		this.values = new float[Chromanal.CHROMA_LENGTH];
// 		if (chroma.length != Chromanal.CHROMA_LENGTH) {
// 			throw new WrongChromaSize("Wrong Chroma size");
// 		}
// 		System.arraycopy(chroma, 0, values, 0, Chromanal.CHROMA_LENGTH - 1);
// 	}
// 
// 	/* Public / Package methods */
// 
// 	/* Private methods */
// }


// Path: src/test/java/org/harmony_analyser/jharmonyanalyser/services/AudioAnalyserTest.java
import org.harmony_analyser.application.visualizations.DataChartFactory;
import org.harmony_analyser.jharmonyanalyser.chroma_analyser.Chroma;
import org.harmony_analyser.jharmonyanalyser.plugins.*;
import static org.mockito.Mockito.*;
import java.io.*;
import org.junit.*;
import static org.junit.Assert.assertEquals;

		testWavFile = new File(classLoader.getResource("test.wav").getPath());
		testReportFixture = new File(classLoader.getResource("test-printAnalysisFixture.txt").getPath());
	}

	@Test(expected = AudioAnalyser.IncorrectInputException.class)
	public void shouldThrowExceptionOnWrongFile() throws IOException, AudioAnalyser.LoadFailedException, AudioAnalyser.IncorrectInputException, AudioAnalyser.OutputAlreadyExists, Chroma.WrongChromaSize {
		AnalysisFactory analysisFactory = new AnalysisFactory();
		audioAnalyser = new AudioAnalyser(analysisFactory, dataChartFactory);
		audioAnalyser.runAnalysis(wrongInputFile, "chord_analyser:average_chord_complexity_distance", true, false);
	}

	@Test
	public void shouldPrintPlugins() throws IOException {
		String[] availablePlugins = { "test_plugin" };
		String[] visualPlugins = { "visual_plugin" };
		AnalysisFactory analysisFactory = mock(AnalysisFactory.class);
		DataChartFactory dataChartFactory = mock(DataChartFactory.class);
		when(analysisFactory.getAvailablePlugins()).thenReturn(availablePlugins);
		when(dataChartFactory.getAllVisualizations()).thenReturn(visualPlugins);

		audioAnalyser = new AudioAnalyser(analysisFactory, dataChartFactory) {
			public String printInstalledVampPlugins() {
				return "\nINSTALLED_VAMP_PLUGINS_FOLLOW\n";
			}
		};

		BufferedReader readerFixture = new BufferedReader(new FileReader(testReportFixture));
		StringBuilder fixtureString = new StringBuilder();
		String line;
		while ((line = readerFixture.readLine()) != null) { // Check for null is valid
			fixtureString.append(line).append("\n");