### Question:
PrivateWorldStateReader { public Optional<PrivateTransactionReceipt> getPrivateTransactionReceipt( final Hash blockHash, final Hash transactionHash) { return privateStateStorage.getTransactionReceipt(blockHash, transactionHash); } PrivateWorldStateReader(
      final PrivateStateRootResolver privateStateRootResolver,
      final WorldStateArchive privateWorldStateArchive,
      final PrivateStateStorage privateStateStorage); Optional<Bytes> getContractCode(
      final String privacyGroupId, final Hash blockHash, final Address contractAddress); List<PrivateTransactionMetadata> getPrivateTransactionMetadataList(
      final String privacyGroupId, final Hash blockHash); Optional<PrivateTransactionReceipt> getPrivateTransactionReceipt(
      final Hash blockHash, final Hash transactionHash);  }### Answer:
@Test public void getPrivateTransactionReceiptReturnEmptyIfReceiptDoesNotExist() { final Bytes32 blockHash = Bytes32.random(); final Bytes32 transactionHash = Bytes32.random(); when(privateStateStorage.getTransactionReceipt(blockHash, transactionHash)) .thenReturn(Optional.empty()); final Optional<PrivateTransactionReceipt> privateTransactionReceipt = privateWorldStateReader.getPrivateTransactionReceipt( Hash.hash(blockHash), Hash.hash(transactionHash)); assertThat(privateTransactionReceipt).isEmpty(); }
@Test public void getPrivateTransactionReceiptReturnExpectedReceipt() { final Hash blockHash = Hash.hash(Bytes32.random()); final Hash transactionHash = Hash.hash(Bytes32.random()); final PrivateTransactionReceipt receipt = new PrivateTransactionReceiptTestFixture().create(); when(privateStateStorage.getTransactionReceipt(blockHash, transactionHash)) .thenReturn(Optional.of(receipt)); final Optional<PrivateTransactionReceipt> privateTransactionReceipt = privateWorldStateReader.getPrivateTransactionReceipt(blockHash, transactionHash); assertThat(privateTransactionReceipt).hasValue(receipt); }