class MosaicResolutionStatement extends ResolutionStatement<UnresolvedMosaicId, MosaicId> {

  public static Optional<MosaicId> getResolvedMosaicId(
      List<MosaicResolutionStatement> statements,
      BigInteger height,
      UnresolvedMosaicId mosaicAlias,
      long primaryId,
      long secondaryId) {
    if (mosaicAlias instanceof MosaicId) {
      return Optional.of((MosaicId) mosaicAlias);
    }
    return statements.stream()
        .filter(s -> height.equals(s.getHeight()))
        .filter(r -> r.getUnresolved().equals(mosaicAlias))
        .map(
            r -> r.getResolutionEntryById(primaryId, secondaryId).map(ResolutionEntry::getResolved))
        .findFirst()
        .flatMap(Function.identity());
  }

  public  MosaicResolutionStatement(
      String recordId,
      BigInteger height,
      UnresolvedMosaicId unresolved,
      List<ResolutionEntry<MosaicId>> resolutionEntries);

}