### Question:
ReceiptMappingVertx { public Receipt createReceiptFromDto(Object receiptDto) { ReceiptType type = ReceiptType.rawValueOf(jsonHelper.getInteger(receiptDto, "type")); switch (type) { case HARVEST_FEE: case LOCK_HASH_CREATED: case LOCK_HASH_COMPLETED: case LOCK_HASH_EXPIRED: case LOCK_SECRET_CREATED: case LOCK_SECRET_COMPLETED: case LOCK_SECRET_EXPIRED: return createBalanceChangeReceipt( jsonHelper.convert(receiptDto, BalanceChangeReceiptDTO.class)); case MOSAIC_RENTAL_FEE: case NAMESPACE_RENTAL_FEE: return createBalanceTransferRecipient( jsonHelper.convert(receiptDto, BalanceTransferReceiptDTO.class)); case MOSAIC_EXPIRED: return createArtifactExpiryReceipt( jsonHelper.convert(receiptDto, MosaicExpiryReceiptDTO.class), type); case NAMESPACE_EXPIRED: case NAMESPACE_DELETED: return createArtifactExpiryReceipt( jsonHelper.convert(receiptDto, NamespaceExpiryReceiptDTO.class), type); case INFLATION: return createInflationReceipt(jsonHelper.convert(receiptDto, InflationReceiptDTO.class)); default: throw new IllegalArgumentException("Receipt type: " + type.name() + " not valid"); } } ReceiptMappingVertx(JsonHelper jsonHelper); AddressResolutionStatement createAddressResolutionStatementFromDto(
      ResolutionStatementInfoDTO receiptDto); MosaicResolutionStatement createMosaicResolutionStatementFromDto(
      ResolutionStatementInfoDTO receiptDto); TransactionStatement createTransactionStatement(TransactionStatementInfoDTO input); Receipt createReceiptFromDto(Object receiptDto); ArtifactExpiryReceipt<NamespaceId> createArtifactExpiryReceipt(
      NamespaceExpiryReceiptDTO receipt, ReceiptType type); ArtifactExpiryReceipt<MosaicId> createArtifactExpiryReceipt(
      MosaicExpiryReceiptDTO receipt, ReceiptType type); BalanceChangeReceipt createBalanceChangeReceipt(BalanceChangeReceiptDTO receipt); BalanceTransferReceipt createBalanceTransferRecipient(BalanceTransferReceiptDTO receipt); InflationReceipt createInflationReceipt(InflationReceiptDTO receipt);  }### Answer:
@Test public void createReceiptFromDtoInvalid() { ReceiptMappingVertx receiptMappingOkHttp = new ReceiptMappingVertx(jsonHelper); IllegalArgumentException e = Assertions.assertThrows( IllegalArgumentException.class, () -> { receiptMappingOkHttp.createReceiptFromDto(Collections.singletonMap("type", 61763)); }); Assertions.assertEquals("Receipt type: ADDRESS_ALIAS_RESOLUTION not valid", e.getMessage()); }