@Override
    public boolean isTypeOf(Class<?> type) {
        checkNotNull(type);

        return id.isTypeOf(type);
    }
@Test
    public void testTypeOf() {
        DiscreteResource discrete = Resources.discrete(D1, P1, VLAN1).resource();

        assertThat(discrete.isTypeOf(DeviceId.class), is(false));
        assertThat(discrete.isTypeOf(PortNumber.class), is(false));
        assertThat(discrete.isTypeOf(VlanId.class), is(true));
    }