@Test public void addressConstantIsConsistentWithNemesisBlock() { // Arrange: final Block block = this.loadNemesisBlock(); final Address blockAddress = block.getSigner().getAddress(); // Assert: Assert.assertThat(blockAddress, IsEqual.equalTo(NEMESIS_BLOCK_INFO.getAddress())); Assert.assertThat( blockAddress.getPublicKey(), IsEqual.equalTo(NEMESIS_BLOCK_INFO.getAddress().getPublicKey())); Assert.assertThat(blockAddress.getPublicKey(), IsNull.notNullValue()); }
@Test public void nemesisTransactionSignersHavePublicKeys() { // Arrange: final Block block = this.loadNemesisBlock(); // Act: final Set<Address> signerAddresses = block .getTransactions() .stream() .map(t -> t.getSigner().getAddress()) .collect(Collectors.toSet()); // Assert: for (final Address address : signerAddresses) { Assert.assertThat(address.getPublicKey(), IsNull.notNullValue()); } }