### Question:
RemoteInputChannel extends InputChannel implements BufferRecycler, BufferListener { @VisibleForTesting @Override public void requestSubpartition(int subpartitionIndex) throws IOException, InterruptedException { if (partitionRequestClient == null) { try { partitionRequestClient = connectionManager.createPartitionRequestClient(connectionId); } catch (IOException e) { throw new PartitionConnectionException(partitionId, e); } partitionRequestClient.requestSubpartition(partitionId, subpartitionIndex, this, 0); } } RemoteInputChannel(
		SingleInputGate inputGate,
		int channelIndex,
		ResultPartitionID partitionId,
		ConnectionID connectionId,
		ConnectionManager connectionManager,
		int initialBackOff,
		int maxBackoff,
		InputChannelMetrics metrics,
		@Nonnull MemorySegmentProvider memorySegmentProvider); @VisibleForTesting @Override void requestSubpartition(int subpartitionIndex); @Override boolean isReleased(); @Override String toString(); @Override void recycle(MemorySegment segment); int getNumberOfAvailableBuffers(); int getNumberOfRequiredBuffers(); int getSenderBacklog(); @Override NotificationResult notifyBufferAvailable(Buffer buffer); @Override void notifyBufferDestroyed(); int getUnannouncedCredit(); int getAndResetUnannouncedCredit(); int getNumberOfQueuedBuffers(); @Override int unsynchronizedGetNumberOfQueuedBuffers(); int unsynchronizedGetExclusiveBuffersUsed(); int unsynchronizedGetFloatingBuffersAvailable(); InputChannelID getInputChannelId(); int getInitialCredit(); BufferProvider getBufferProvider(); @Nullable Buffer requestBuffer(); void onBuffer(Buffer buffer, int sequenceNumber, int backlog); void onEmptyBuffer(int sequenceNumber, int backlog); void onFailedPartitionRequest(); void onError(Throwable cause);  }### Answer:
@Test public void testPartitionConnectionExceptionWhileRequestingPartition() throws Exception { final RemoteInputChannel inputChannel = InputChannelTestUtils.createRemoteInputChannel( createSingleInputGate(1), 0, new TestingExceptionConnectionManager()); try { inputChannel.requestSubpartition(0); fail("Expected PartitionConnectionException."); } catch (PartitionConnectionException ex) { assertThat(inputChannel.getPartitionId(), is(ex.getPartitionId())); } }