flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/PipelinedSubpartitionTest.java
/**
	 * Verifies that the isReleased() check of the view checks the parent
	 * subpartition.
	 */
Verifies that the isReleased() check of the view checks the parent
subpartition.
Verifies that the isReleased () check of the view checks the parent subpartition .
@Test
	public void testIsReleasedChecksParent() throws Exception {
		PipelinedSubpartition subpartition = mock(PipelinedSubpartition.class);
		PipelinedSubpartitionView reader = new PipelinedSubpartitionView(
				subpartition, mock(BufferAvailabilityListener.class));
		assertFalse(reader.isReleased());
		verify(subpartition, times(1)).isReleased();
		when(subpartition.isReleased()).thenReturn(true);
		assertTrue(reader.isReleased());
		verify(subpartition, times(2)).isReleased();
	}
@ Test public void testIsReleasedChecksParent ( ) throws Exception { PipelinedSubpartition subpartition = mock ( PipelinedSubpartition . class ) ; PipelinedSubpartitionView reader = new PipelinedSubpartitionView ( subpartition , mock ( BufferAvailabilityListener . class ) ) ; assertFalse ( reader . isReleased ( ) ) ; verify ( subpartition , times ( 1 ) ) . isReleased ( ) ; when ( subpartition . isReleased ( ) ) . thenReturn ( true ) ; assertTrue ( reader . isReleased ( ) ) ; verify ( subpartition , times ( 2 ) ) . isReleased ( ) ; }
Verifies that the isReleased() check of the view checks the parent
 subpartition.
Verifies that the isReleased () check of the view checks the parent subpartition .