EntityClass extends ModelClass<E> { public final Class<?> idClass() { return idClass; } protected  EntityClass(Class<E> cls); static EntityClass<E> asEntityClass(Class<E> cls); E create(Object constructionArgument); final EntityFactory<E> factory(); final EntityState defaultState(); final Columns columns(); final Constructor<E> constructor(); final Class<?> idClass(); final Class<? extends EntityState> stateClass(); final MessageType stateType(); final EntityVisibility visibility(); final EntityTypeName typeName(); @SuppressWarnings("unchecked") // The cast is protected by the generic param of this class. @Override Class<E> value(); final TypeUrl stateTypeUrl(); @Override boolean equals(Object o); @Override int hashCode(); static Class<I> idClass(Class<? extends Entity> cls); static Class<S> stateClassOf(Class<? extends Entity> entityClass);  }
@Test @DisplayName("return ID class") void returnIdClass() { @SuppressWarnings("unchecked") Class<TaskId> actual = (Class<TaskId>) entityClass.idClass(); assertEquals(TaskId.class, actual); }