}
@Test
public void ensureThreeFragments() throws FragmentSetupException, IOException {
PhysicalPlanReader ppr = new PhysicalPlanReader(CONFIG, CONFIG.getMapper(), DrillbitEndpoint.getDefaultInstance());
Fragment b = getRootFragment(ppr, "/physical_double_exchange.json");
logger.debug("Fragment Node {}", b);
assertEquals(3, getFragmentCount(b));
assertEquals(1, b.getReceivingExchangePairs().size());
assertNull(b.getSendingExchange());
// get first child.
b = b.iterator().next().getNode();
assertEquals(1, b.getReceivingExchangePairs().size());
assertNotNull(b.getSendingExchange());
b = b.iterator().next().getNode();
assertEquals(0, b.getReceivingExchangePairs().size());
assertNotNull(b.getSendingExchange());
}