protected void generateEipStatistics() {

        // generate the statistics for each EIP within a route
        for (Route route : routeMap.values()) {

            Map<Integer, List<EipStatistic>> eipStatisticMap = new HashMap<>();

            Components components = route.getComponents();
            Map<String, List<EipAttribute>> eipAttributesMap = components.getAttributeMap();

            eipAttributesMap.forEach((key, eipAttributes) -> {

                // 'rest' is a route attribute, not an EIP, so it doesn't make sense to include it
                if (!key.equals(REST)) {

                    eipAttributes.forEach(eipAttribute -> {

                        EipStatistic eipStatistic = new EipStatistic();
                        eipStatistic.setId(key);
                        eipStatistic.setTested(eipAttribute.getExchangesTotal() > 0);
                        eipStatistic.setTotalProcessingTime(eipAttribute.getTotalProcessingTime());
                        eipStatistic.setProperties(eipAttribute.getProperties());

                        eipAttribute.getChildEipMap().forEach((childKey, childEipList) -> {

                            childEipList.forEach(childEip -> {
                                ChildEipStatistic childEipStatistic = new ChildEipStatistic();
                                childEipStatistic.setId(childEip.getId());
                                generateChildEipStatistics(childEip, childEipStatistic);
                                eipStatistic.getChildEipStatisticMap().put(childKey, childEipStatistic);
                            });
                        });

                        List<EipStatistic> eipStatisticList;
                        if (eipStatisticMap.containsKey(eipAttribute.getIndex())) {
                            eipStatisticList = eipStatisticMap.get(eipAttribute.getIndex());
                        } else {
                            eipStatisticList = new ArrayList<>();
                        }
                        eipStatisticList.add(eipStatistic);
                        eipStatisticMap.put(eipAttribute.getIndex(), eipStatisticList);
                    });
                }
            });

            RouteStatistic routeStatistic = routeStatisticMap.get(route.getId());
            routeStatistic.setEipStatisticMap(eipStatisticMap);
            routeStatisticMap.put(route.getId(), routeStatistic);
        }
    }
@Test
    public void testGenerateEipStatistics() throws IllegalAccessException, IOException {

        Mockito
                .doReturn(outputPath().getPath())
                .when(processor).writeReportIndex(any(String.class), any(File.class));

        @SuppressWarnings("unchecked")
        Map<String, RouteStatistic> routeStatisticMap
                = (Map<String, RouteStatistic>) FieldUtils.readDeclaredField(processor, "routeStatisticMap", true);

        assertAll(
                () -> assertNotNull(routeStatisticMap),
                () -> assertTrue(routeStatisticMap.isEmpty()));

        processor.parseAllTestResults(xmlPath());
        processor.gatherBestRouteCoverages();
        processor.generateRouteStatistics("test project", outputPath());
        processor.generateEipStatistics();

        assertAll(
                () -> assertNotNull(routeStatisticMap),
                () -> assertFalse(routeStatisticMap.isEmpty()));

        RouteStatistic result = routeStatisticMap.get(GREETINGS_ROUTE);

        assertAll(
                () -> assertNotNull(result),
                () -> assertNotNull(result.getEipStatisticMap()),
                () -> assertEquals(3, result.getEipStatisticMap().size()));
    }