@@ -0,0 +1,1648 @@
+package com.op1.aiff;%0A%0Aimport com.op1.iff.IffReader;%0Aimport com.op1.iff.IffWriter;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.TemporaryFolder;%0A%0Aimport java.io.*;%0A%0Aimport static org.hamcrest.CoreMatchers.equalTo;%0Aimport static org.junit.Assert.assertThat;%0A%0Apublic class ChannelSplitterTest %7B%0A%0A    @Rule%0A    public TemporaryFolder temporaryFolder = new TemporaryFolder();%0A%0A    private static final String ALBUM_FILE = %22Scrap30.aif%22;%0A%0A    @Test%0A    public void canSplitStereoFile() throws Exception %7B%0A%0A        final InputStream inputStream = ChannelSplitterTest.class.getClassLoader().getResourceAsStream(ALBUM_FILE);%0A        final DataInputStream dataInputStream = new DataInputStream(inputStream);%0A        final IffReader iffReader = new IffReader(dataInputStream);%0A        final AiffReader aiffReader = new AiffReader(iffReader);%0A%0A        final Aiff aiff = aiffReader.readAiff();%0A        final Aiff%5B%5D aiffs = new ChannelSplitter().splitChannels(aiff);%0A        assertThat(aiffs.length, equalTo(2));%0A        writeAiff(aiffs%5B0%5D, temporaryFolder.newFile(%22left.aif%22));%0A        writeAiff(aiffs%5B1%5D, temporaryFolder.newFile(%22right.aif%22));%0A    %7D%0A%0A    private void writeAiff(Aiff aiff, File writeFile) throws IOException %7B%0A%0A        System.out.println(writeFile.getAbsolutePath());%0A        final FileOutputStream fileOutputStream = new FileOutputStream(writeFile);%0A        final DataOutputStream dataOutputStream = new DataOutputStream(fileOutputStream);%0A        final IffWriter iffWriter = new IffWriter(dataOutputStream);%0A        final AiffWriter aiffWriter = new AiffWriter(iffWriter);%0A        aiffWriter.writeAiff(aiff);%0A    %7D%0A%7D%0A

Create ChannelSplitterTest.java