* @return the value contained in the field annotated with {@link AggregateIdentifier}
*/
@SuppressWarnings("unchecked")
public <I> I getIdentifier(AbstractAnnotatedAggregateRoot<I> aggregateRoot) {
if (identifierField == null) {
throw new IncompatibleAggregateException(
format("The aggregate class [%s] does not specify an Identifier. "
+ "Ensure that the field containing the aggregate "
+ "identifier is annotated with @AggregateIdentifier.",
aggregateRoot.getClass().getSimpleName()));
}