@Override
@Test
public void testSkip() throws Exception {

	int size = 10;
	UnsyncBufferedReader unsyncBufferedReader = new UnsyncBufferedReader(
		new StringReader(new String(_BUFFER)), size);
	// Zero skip
	Assert.assertEquals(0, unsyncBufferedReader.skip(0));
	// Negetive skip
	try {
		unsyncBufferedReader.skip(-1);
		Assert.fail();
	}
	catch (IllegalArgumentException illegalArgumentException) {
		Assert.assertEquals(
			"Skip is less than 0", illegalArgumentException.getMessage());
	}
	// Load data into buffer
	Assert.assertEquals('a', unsyncBufferedReader.read());
	Assert.assertEquals(1, _indexField.getInt(unsyncBufferedReader));
	Assert.assertEquals(
		size, _firstInvalidIndexField.getInt(unsyncBufferedReader));
	// In-memory
	Assert.assertEquals(size - 1, unsyncBufferedReader.skip(size * 2));
	Assert.assertEquals('a' + 10, unsyncBufferedReader.read());
	Assert.assertEquals(size - 1, unsyncBufferedReader.skip(size * 2));
	// Underlying reader
	Assert.assertEquals(size * 2, unsyncBufferedReader.skip(size * 2));
	Assert.assertEquals('a' + (40 % 26), unsyncBufferedReader.read());
	// Clear out buffer
	Assert.assertEquals(size - 1, unsyncBufferedReader.skip(size));
	// Mark
	unsyncBufferedReader.mark(size * 2);
	// Load data into buffer for skipping
	Assert.assertEquals(size, unsyncBufferedReader.skip(size * 2));
	// In-memory
	Assert.assertEquals(size / 2, unsyncBufferedReader.skip(size / 2));
	unsyncBufferedReader.reset();
	Assert.assertEquals('a' + (50 % 26), unsyncBufferedReader.read());
	// Clear out buffer
	Assert.assertEquals(
		(size * 2) - 1, unsyncBufferedReader.skip(size * 2));
	// Mark a large size for EOF
	unsyncBufferedReader.mark(_SIZE);
	// Consume all the data
	while (unsyncBufferedReader.read() != -1);
	// Skip on EOF
	Assert.assertEquals(0, unsyncBufferedReader.skip(1));
}