public static <T> Supplier<Optional<T>> onePoint(T value) {
        final boolean[] finished = new boolean[] {false};
        return () -> {
            if (!finished[0]) {
                finished[0] = true;
                return Optional.of(value);
            } else {
                return Optional.empty();
            }
        };
    }
@Test
    public void testOnePointIdGenerator() {
        Supplier<Optional<Integer>> idGen = Util.onePoint(1);
        Optional<Integer> a = idGen.get();
        Assert.assertTrue(a.isPresent());
        Assert.assertEquals(a.get().intValue(), 1);
        Assert.assertFalse(idGen.get().isPresent());
    }