public static long gcd(long... values) {
        long res = 0;
        for (long value : values) {
            res = gcd(res, value);
        }
        return res;
    }
@Test
    public void test_calculateGcd2() {
        assertEquals(2, gcd(0L, 2L));
        assertEquals(1, gcd(1L, 2L));
        assertEquals(2, gcd(2L, 4L));
        assertEquals(2, gcd(-2L, 4L));
    }