@Override
    public Set<DiscreteResource> values() {
        // breaks immutability, but intentionally returns the field
        // because this class is transient
        return values;
    }
@Test
    public void testValues() {
        DiscreteResource res1 = Resources.discrete(DeviceId.deviceId("a")).resource();
        DiscreteResource res2 = Resources.discrete(DeviceId.deviceId("b")).resource();

        DiscreteResources sut = GenericDiscreteResources.of(ImmutableSet.of(res1, res2));

        assertThat(sut.values(), is(ImmutableSet.of(res1, res2)));
    }