@Override public int hashCode() { return Objects.hash(getHash(), getSize(), getVersion(), getPrevBlockHash(), getMerkleRootHash(), getTime(), getIndex(), getNonce(), getNextConsensus(), getScript(), getTransactions(), getConfirmations(), getNextBlockHash()); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof NeoBlock)) return false; NeoBlock neoBlock = (NeoBlock) o; return getSize() == neoBlock.getSize() && getVersion() == neoBlock.getVersion() && getTime() == neoBlock.getTime() && getIndex() == neoBlock.getIndex() && getConfirmations() == neoBlock.getConfirmations() && Objects.equals(getHash(), neoBlock.getHash()) && Objects.equals(getPrevBlockHash(), neoBlock.getPrevBlockHash()) && Objects.equals(getMerkleRootHash(), neoBlock.getMerkleRootHash()) && Objects.equals(getNonce(), neoBlock.getNonce()) && Objects.equals(getNextConsensus(), neoBlock.getNextConsensus()) && Objects.equals(getScript(), neoBlock.getScript()) && Objects.equals(getTransactions(), neoBlock.getTransactions()) && Objects.equals(getNextBlockHash(), neoBlock.getNextBlockHash()); }
assertThat(getBlock.getBlock(), is(notNullValue())); assertThat(getBlock.getBlock().getHash(), is("0x498b16db3fba92448fac63caeecb91ce38cb4b565de7d717d473f0dd37a1e816")); assertThat(getBlock.getBlock().getSize(), is(1217L)); assertThat(getBlock.getBlock().getVersion(), is(0)); assertThat(getBlock.getBlock().getPrevBlockHash(), is("0x045cabde4ecbd50f5e4e1b141eaf0842c1f5f56517324c8dcab8ccac924e3a39")); assertThat(getBlock.getBlock().getMerkleRootHash(), is("0x6afa63201b88b55ad2213e5a69a1ad5f0db650bc178fc2bedd2fb301c1278bf7")); assertThat(getBlock.getBlock().getTime(), is(1539968858L)); assertThat(getBlock.getBlock().getIndex(), is(1914006L)); assertThat(getBlock.getBlock().getNonce(), is("44ed38ca21ae8877")); assertThat(getBlock.getBlock().getNextConsensus(), is("AWZo4qAxhT8fwKL93QATSjCYCgHmCY1XLB")); assertThat(getBlock.getBlock().getScript(), is(notNullValue())); assertThat( getBlock.getBlock().getScript(), is( new Script( assertThat(getBlock.getBlock().getTransactions(), is(nullValue())); assertThat(getBlock.getBlock().getConfirmations(), is(7878)); assertThat(getBlock.getBlock().getNextBlockHash(), is("0x4a97ca89199627f877b6bffe865b8327be84b368d62572ef20953829c3501643"));
assertThat(getBlock.getBlock(), is(notNullValue())); assertThat(getBlock.getBlock().getHash(), is("0x498b16db3fba92448fac63caeecb91ce38cb4b565de7d717d473f0dd37a1e816")); assertThat(getBlock.getBlock().getSize(), is(1217L)); assertThat(getBlock.getBlock().getVersion(), is(0)); assertThat(getBlock.getBlock().getPrevBlockHash(), is("0x045cabde4ecbd50f5e4e1b141eaf0842c1f5f56517324c8dcab8ccac924e3a39")); assertThat(getBlock.getBlock().getMerkleRootHash(), is("0x6afa63201b88b55ad2213e5a69a1ad5f0db650bc178fc2bedd2fb301c1278bf7")); assertThat(getBlock.getBlock().getTime(), is(1539968858L)); assertThat(getBlock.getBlock().getIndex(), is(1914006L)); assertThat(getBlock.getBlock().getNonce(), is("44ed38ca21ae8877")); assertThat(getBlock.getBlock().getNextConsensus(), is("AWZo4qAxhT8fwKL93QATSjCYCgHmCY1XLB")); assertThat(getBlock.getBlock().getScript(), is(notNullValue())); assertThat( getBlock.getBlock().getScript(), CoreMatchers.is( new Script( assertThat(getBlock.getBlock().getTransactions(), hasSize(3)); getBlock.getBlock().getTransactions(), containsInAnyOrder( new Transaction( assertThat(getBlock.getBlock().getConfirmations(), is(7878)); assertThat(getBlock.getBlock().getNextBlockHash(), is("0x4a97ca89199627f877b6bffe865b8327be84b368d62572ef20953829c3501643"));