AggregatePart extends Aggregate<I, S, B> { protected <P extends EntityState> P partState(Class<P> partStateClass) { P partState = root.partState(partStateClass); return partState; } protected  AggregatePart(R root);   }
@Test @DisplayName("return aggregate part state by class") void returnAggregatePartStateByClass() { taskRepository.store(taskPart); AggTask task = taskCommentsPart.partState(AggTask.class); assertEquals(ASSIGNEE, task.getAssignee()); }