@VisibleForTesting
    static double convert(double value, TimeUnit from, TimeUnit target) {
        if (target.compareTo(from) > 0) {
            return value / from.convert(1, target);
        }
        return value * target.convert(1, from);
    }
@Test
    public void convertTest() {
        for (TimeUnit from : TimeUnit.values()) {
            for (TimeUnit to : TimeUnit.values()) {
                assertEquals(1.0, convert(convert(1.0, from, to), to, from), 0.0001,
                    from + " to " + to + " and back");
            }
        }
    }