flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/RpcEndpointTest.java
/**
	 * Tests that we cannot accidentally obtain a wrong self gateway type which is
	 * not implemented by the RpcEndpoint.
	 */
Tests that we cannot accidentally obtain a wrong self gateway type which is
not implemented by the RpcEndpoint.
Tests that we cannot accidentally obtain a wrong self gateway type which is not implemented by the RpcEndpoint .
@Test(expected = RuntimeException.class)
	public void testWrongSelfGateway() throws Exception {
		int expectedValue = 1337;
		BaseEndpoint baseEndpoint = new BaseEndpoint(rpcService, expectedValue);
		try {
			baseEndpoint.start();
			DifferentGateway differentGateway = baseEndpoint.getSelfGateway(DifferentGateway.class);
			fail("Expected to fail with a RuntimeException since we requested the wrong gateway type.");
		} finally {
			baseEndpoint.shutDown();
		}
	}
@ Test ( expected = RuntimeException . class ) public void testWrongSelfGateway ( ) throws Exception { int expectedValue = 1337 ; BaseEndpoint baseEndpoint = new BaseEndpoint ( rpcService , expectedValue ) ; try { baseEndpoint . start ( ) ; DifferentGateway differentGateway = baseEndpoint . getSelfGateway ( DifferentGateway . class ) ; fail ( "Expected to fail with a RuntimeException since we requested the wrong gateway type." ) ; } finally { baseEndpoint . shutDown ( ) ; } }
Tests that we cannot accidentally obtain a wrong self gateway type which is
 not implemented by the RpcEndpoint.
Tests that we cannot accidentally obtain a wrong self gateway type which is not implemented by the RpcEndpoint .