### Question:
StatisticDataCollectionHelper { public static int getParentFlowPosition(MessageContext messageContext, Integer newParentIndex) { Integer parentIndex = (Integer) messageContext.getProperty(StatisticsConstants.MEDIATION_FLOW_STATISTICS_PARENT_INDEX); if (newParentIndex != null) { messageContext.setProperty(StatisticsConstants.MEDIATION_FLOW_STATISTICS_PARENT_INDEX, newParentIndex); } if (parentIndex == null) { return StatisticsConstants.DEFAULT_PARENT_INDEX; } else { return parentIndex; } }  static String getStatisticTraceId(MessageContext messageContext); static int getFlowPosition(MessageContext messageContext); static int getParentFlowPosition(MessageContext messageContext, Integer newParentIndex); static List<Integer> getParentList(MessageContext messageContext); static boolean isOutOnlyFlow(MessageContext messageContext); static void collectData(MessageContext messageContext, boolean isContentAltering,
	                               Boolean isCollectingTracing, StatisticDataUnit statisticDataUnit); static void collectAggregatedParents(List<MessageContext> messages, MessageContext newCtx);  }### Answer:
@Test public void testGetParentFlowPosition() { int position = StatisticDataCollectionHelper.getParentFlowPosition(messageContext, 0); Assert.assertNotNull("should set a new parent index property", messageContext.getProperty(StatisticsConstants.MEDIATION_FLOW_STATISTICS_PARENT_INDEX)); Assert.assertEquals("should return the default parent index", StatisticsConstants.DEFAULT_PARENT_INDEX, position); messageContext.setProperty(StatisticsConstants.MEDIATION_FLOW_STATISTICS_PARENT_INDEX, 1); Assert.assertEquals("should return the inserted value to the parent index property", 1, StatisticDataCollectionHelper.getParentFlowPosition(messageContext, 0)); }