@Test
    public void testReturnTypes() {
        assertEquals(3d, __.__(2, 4).fold().mean(Scope.local).next());
        assertEquals(3d, __.__((short) 2, (short) 4).fold().mean(Scope.local).next()); // why? because the internal counter is a Long value
        assertEquals(BigDecimal.ONE, __.__(BigInteger.ONE, BigInteger.ONE).fold().mean(Scope.local).next());
        assertEquals(BigDecimal.ONE, __.__((short) 1, BigInteger.ONE).fold().mean(Scope.local).next());
        assertEquals(BigDecimal.ONE, __.__(BigInteger.ONE, (short) 1).fold().mean(Scope.local).next());
    }
@author Daniel Kuppitz (http://gremlin.guru)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MeanLocalStepTest.java