@Test
public void testOnFailedPartitionRequest() throws Exception {

	final ConnectionManager connectionManager = mock(ConnectionManager.class);
	when(connectionManager.createPartitionRequestClient(any(ConnectionID.class)))
			.thenReturn(mock(PartitionRequestClient.class));
	final ResultPartitionID partitionId = new ResultPartitionID();
	final SingleInputGate inputGate = mock(SingleInputGate.class);
	final RemoteInputChannel ch = new RemoteInputChannel(
			inputGate,
			0,
			partitionId,
			mock(ConnectionID.class),
			connectionManager);
	ch.onFailedPartitionRequest();
	verify(inputGate).triggerPartitionStateCheck(eq(partitionId));
}