	@Test
	void testGetAudioStream() throws InterruptedException, IOException {

		byte[] in = new byte[getFormat().getFrameSize() * 100];
		byte[] out = new byte[in.length];

		fillBuffer(in);

		BasicSoundPlayer player = new BasicSoundPlayer(in, getFormat(), 1);
		try (AudioInputStream ais = player.getAudioStream()) {

			player.start();

			int amount = readAll(out, ais);
			Assertions.assertEquals(in.length, amount, "Wrong number of bytes");
			Assertions.assertArrayEquals(in, out, "Wrong data.");
		}
	}