ImmutableEntityIdWithResourceType implements EntityIdWithResourceType { static EntityIdWithResourceType readFrom(final String string) { checkNotNull(string, "string"); final int delimiterIndex = string.indexOf(DELIMITER); if (delimiterIndex < 0) { final String message = MessageFormat.format("Unexpected EntityId format: <{0}>", string); throw new IllegalArgumentException(message); } else { final EntityId id = DefaultEntityId.of(string.substring(delimiterIndex + 1)); final String resourceType = string.substring(0, delimiterIndex); return new ImmutableEntityIdWithResourceType(resourceType, id, null); } } private  ImmutableEntityIdWithResourceType(
            final String resourceType,
            final EntityId id,
            @Nullable final CacheLookupContext cacheLookupContext); @Override String getResourceType(); @Override EntityId getId(); @Override Optional<CacheLookupContext> getCacheLookupContext(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testDeserialization() { assertThat(ImmutableEntityIdWithResourceType.readFrom(EXPECTED_SERIALIZED_ENTITY_ID)).isEqualTo(ENTITY_ID); }