コード例 #1
0
    @Test
    public void amountConstantIsConsistentWithNemesisBlock() {
      // Act:
      Amount totalAmount = Amount.ZERO;
      final Block block = this.loadNemesisBlock();
      for (final Transaction transaction : block.getTransactions()) {
        if (transaction instanceof TransferTransaction) {
          totalAmount = totalAmount.add(((TransferTransaction) transaction).getAmount());
        }
      }

      // Assert:
      Assert.assertThat(totalAmount, IsEqual.equalTo(NEMESIS_BLOCK_INFO.getAmount()));
    }