@Test
public void testIllegalReadViewRequest() throws Exception {

	final PipelinedSubpartition subpartition = createSubpartition();
	// Successful request
	assertNotNull(subpartition.createReadView(new BufferAvailabilityListener() {
		@Override
		public void notifyBuffersAvailable(long numBuffers) {
		}
	}));
	try {
		subpartition.createReadView(new BufferAvailabilityListener() {
			@Override
			public void notifyBuffersAvailable(long numBuffers) {
			}
		});
		fail("Did not throw expected exception after duplicate notifyNonEmpty view request.");
	} catch (IllegalStateException expected) {
	}
}