public static Key of(String key, ApplicationId appId) {
        return new StringKey(key, appId);
    }
@Test
    public void keysAreImmutable() {
        assertThatClassIsImmutableBaseClass(Key.class);

        // Will be a long based key, class is private so cannot be
        // accessed directly
        Key longKey = Key.of(0xabcdefL, NetTestTools.APP_ID);
        assertThatClassIsImmutable(longKey.getClass());

        // Will be a String based key, class is private so cannot be
        // accessed directly.
        Key stringKey = Key.of("some key", NetTestTools.APP_ID);
        assertThatClassIsImmutable(stringKey.getClass());
    }