@Test
 public void testPlaySuccess() throws MidiUnavailableException, InvalidMidiDataException {
   AutoComposer ac = new SmoothComposer();
   ac.iniParameter(0, 5, 127, 1000, 500, 18);
   ac.generateMusic();
   MediaPlayer mp = new MediaMidiPlayer(ac);
   mp.play();
 }
 @Test(expected = InvalidMidiDataException.class)
 public void testPlayFailed() throws MidiUnavailableException, InvalidMidiDataException {
   AutoComposer ac = new SmoothComposer();
   ac.iniParameter(0, 5, 128, 1000, 500, 18);
   ac.generateMusic();
   MediaPlayer mp = new MediaMidiPlayer(ac);
   mp.play();
 }