### Question:
StatisticDataCollectionHelper { public static int getFlowPosition(MessageContext messageContext) { UniqueIdentifierObject uniqueIdentifierObject = (UniqueIdentifierObject) messageContext .getProperty(StatisticsConstants.MEDIATION_FLOW_STATISTICS_INDEXING_OBJECT); if (uniqueIdentifierObject == null) { uniqueIdentifierObject = new UniqueIdentifierObject(); messageContext .setProperty(StatisticsConstants.MEDIATION_FLOW_STATISTICS_INDEXING_OBJECT, uniqueIdentifierObject); return uniqueIdentifierObject.getCurrentLevel(); } else { return uniqueIdentifierObject.getNextIndex(); } }  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 testGetFlowPosition() { int currentIndex = StatisticDataCollectionHelper.getFlowPosition(messageContext); Assert.assertEquals("index should start from 0", 0, currentIndex); Assert.assertNotNull("indexing object must be set by the method", messageContext.getProperty (StatisticsConstants.MEDIATION_FLOW_STATISTICS_INDEXING_OBJECT)); currentIndex = StatisticDataCollectionHelper.getFlowPosition(messageContext); Assert.assertEquals("index should be incremented to 1", 1, currentIndex); }