@SuppressWarnings("deprecation")
@Test
public void calculateNetworkBufOld() throws Exception {

	Configuration config = new Configuration();
	config.setInteger(TaskManagerOptions.NETWORK_NUM_BUFFERS, 1);
	// note: actual network buffer memory size is independent of the totalJavaMemorySize
	assertEquals(TaskManagerOptions.MEMORY_SEGMENT_SIZE.defaultValue().longValue(),
		TaskManagerServices.calculateNetworkBufferMemory(10L << 20, config));
	assertEquals(TaskManagerOptions.MEMORY_SEGMENT_SIZE.defaultValue().longValue(),
		TaskManagerServices.calculateNetworkBufferMemory(64L << 20, config));
	// test integer overflow in the memory size
	int numBuffers = (int) ((2L << 32) / TaskManagerOptions.MEMORY_SEGMENT_SIZE.defaultValue()); // 2^33
	config.setInteger(TaskManagerOptions.NETWORK_NUM_BUFFERS, numBuffers);
	assertEquals(2L << 32, TaskManagerServices.calculateNetworkBufferMemory(2L << 33, config));
}