@Test
public void testResponseNoStatsAvailable() throws Exception {

	ExecutionJobVertex jobVertex = mock(ExecutionJobVertex.class);
	BackPressureStatsTracker statsTracker = mock(BackPressureStatsTracker.class);
	when(statsTracker.getOperatorBackPressureStats(any(ExecutionJobVertex.class)))
			.thenReturn(Optional.empty());
	JobVertexBackPressureHandler handler = new JobVertexBackPressureHandler(
			mock(ExecutionGraphCache.class),
			Executors.directExecutor(),
			statsTracker,
			9999);
	String response = handler.handleRequest(jobVertex, Collections.<String, String>emptyMap()).get();
	ObjectMapper mapper = new ObjectMapper();
	JsonNode rootNode = mapper.readTree(response);
	// Single element
	assertEquals(1, rootNode.size());
	// Status
	JsonNode status = rootNode.get("status");
	assertNotNull(status);
	assertEquals("deprecated", status.textValue());
	verify(statsTracker).triggerStackTraceSample(any(ExecutionJobVertex.class));
}