/**
 * T'SoundSystem for J2SE (Java Sound API)
 */
package org.twintail.j2se.tss;

import java.io.FileInputStream;
import java.io.InputStream;
import java.io.BufferedInputStream;
import java.net.URL;
import java.net.HttpURLConnection;
import java.util.logging.Logger;
import org.twintail.tss.MasterChannel;
import org.twintail.tss.PsglogPlayer;
import org.twintail.tss.VgmPlayer;

/**
 * class UnitTest
 *
 * This class tests tss classes.
 * @author Takashi Toyoshima <toyoshim@gmail.com>
 */
public final class UnitTest {
    /**
     * Test PSGLOG/AY-3-8910.
     */
    public void test00() {
        try {
            // prepare sound related objects
            AudioLooper loop = new AudioLooper();
            MasterChannel master = new MasterChannel();

            // prepare input audio data
            URL url = new URL("http://chiyo.twintail.org/psglog.1");
            HttpURLConnection urlConnection =
                (HttpURLConnection) url.openConnection();
            InputStream in =
                new BufferedInputStream(urlConnection.getInputStream());

            // play it!
            PsglogPlayer play = new PsglogPlayer();
            play.setMasterChannel(master);
            play.play(in);

            loop.setChannel(master);
            loop.run();
        } catch (Exception e) {
            Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).warning("TEST00"
                    + "> Exception: " + e.toString());
        }
    }

    /**
     * Test VGM/SN76489.
     */
    public void test01() {
        try {
            // prepare sound related objects
            AudioLooper loop = new AudioLooper();
            MasterChannel master = new MasterChannel();

            // prepare input audio data
            InputStream in = new BufferedInputStream(
                    new FileInputStream("../data/test.vgm"));

            // play it!
            VgmPlayer play = new VgmPlayer();
            play.setMasterChannel(master);
            play.play(in);

            loop.setChannel(master);
            loop.run();
        } catch (Exception e) {
            Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).warning("TEST01"
                    + "> Exception: " + e.toString());
        }
    }

    /**
     * Main to run simple test.
     * @param args arguments (not used)
     */
    public static void main(final String[] args) {
        UnitTest test = new UnitTest();
        //test.test00();
        test.test01();
    }
}

@@ -257,24 +257,53 @@
 ing.Logger;%0A
+import org.twintail.tss.Log;%0A
 import org.t
@@ -2230,32 +2230,65 @@
  e.toString());%0A
+            e.printStackTrace();%0A
         %7D%0A    %7D%0A
@@ -2423,24 +2423,59 @@
 g%5B%5D args) %7B%0A
+        Log.setLog(new J2SELog());%0A
         Unit

add unit test class