@Test
    public void terminalNode_multiple() {
        // Given
        Range range = Range.between(0, 60 * 1000);
        TimeWindow timeWindow = new TimeWindow(range);

        // fromNode : [testApp] test-app
        Node fromNode = createNode("testApp", ServiceTypeFactory.of(1000, "WAS"));
        String fromNodeAgent = "test-app";
        // toNode : [testDatabase] test-database1, test-database2
        Node toNode = createNode("testDatabase", ServiceTypeFactory.of(2000, "RDB", ServiceTypeProperty.TERMINAL));
        String toNodeAgent1 = "test-database1";
        String toNodeAgent2 = "test-database2";
        NodeList nodeList = NodeList.of(toNode);

        Link link = new Link(LinkDirection.IN_LINK, fromNode, toNode, range);
        HistogramSlot fastSlot = toNode.getServiceType().getHistogramSchema().getFastSlot();
        HistogramSlot normalSlot = toNode.getServiceType().getHistogramSchema().getNormalSlot();
        // [testApp] test-app -> [testDatabase] test-database1
        long callCount1 = 100L;
        link.addInLink(createLinkCallDataMap(fromNodeAgent, fromNode.getServiceType(), toNodeAgent1, toNode.getServiceType(), fastSlot, callCount1));
        // [testApp] test-app -> [testDatabase] test-database2
        long callCount2 = 50L;
        link.addInLink(createLinkCallDataMap(fromNodeAgent, fromNode.getServiceType(), toNodeAgent2, toNode.getServiceType(), normalSlot, callCount2));
        LinkList linkList = LinkList.of(link);

        // When
        nodeHistogramAppender.appendNodeHistogram(timeWindow, nodeList, linkList, buildTimeoutMillis);

        // Then
        Node actualNode = nodeList.getNodeList().iterator().next();
        NodeHistogram nodeHistogram = actualNode.getNodeHistogram();
        // verify application-level histogram
        Histogram applicationHistogram = nodeHistogram.getApplicationHistogram();
        assertEquals(callCount1, applicationHistogram.getFastCount());
        assertEquals(callCount2, applicationHistogram.getNormalCount());
        assertEquals(callCount1 + callCount2, applicationHistogram.getTotalCount());
        // verify agent-level histogram
        Map<String, Histogram> agentHistogramMap = nodeHistogram.getAgentHistogramMap();
        Histogram agent1Histogram = agentHistogramMap.get(toNodeAgent1);
        assertEquals(callCount1, agent1Histogram.getFastCount());
        assertEquals(callCount1, agent1Histogram.getTotalCount());
        Histogram agent2Histogram = agentHistogramMap.get(toNodeAgent2);
        assertEquals(callCount2, agent2Histogram.getNormalCount());
        assertEquals(callCount2, agent2Histogram.getTotalCount());
    }
Checks histograms for a single terminal node with multiple agents(destinations).
<pre>
    fromNode ---> databaseNode (2 agents)
</pre>
web/src/test/java/com/navercorp/pinpoint/web/applicationmap/appender/histogram/NodeHistogramAppenderTest.java