### Question:
BridgeStorageProvider { public ReleaseRequestQueue getReleaseRequestQueue() throws IOException { if (releaseRequestQueue != null) { return releaseRequestQueue; } releaseRequestQueue = getFromRepository( RELEASE_REQUEST_QUEUE, data -> BridgeSerializationUtils.deserializeReleaseRequestQueue(data, networkParameters) ); return releaseRequestQueue; } BridgeStorageProvider(Repository repository, UscAddress contractAddress, BridgeConstants bridgeConstants, BridgeStorageConfiguration bridgeStorageConfiguration); List<UTXO> getNewFederationUldUTXOs(); void saveNewFederationUldUTXOs(); List<UTXO> getOldFederationUldUTXOs(); void saveOldFederationUldUTXOs(); Map<Sha256Hash, Long> getUldTxHashesAlreadyProcessed(); void saveUldTxHashesAlreadyProcessed(); ReleaseRequestQueue getReleaseRequestQueue(); void saveReleaseRequestQueue(); ReleaseTransactionSet getReleaseTransactionSet(); void saveReleaseTransactionSet(); SortedMap<Keccak256, UldTransaction> getUscTxsWaitingForSignatures(); void saveUscTxsWaitingForSignatures(); Federation getNewFederation(); void setNewFederation(Federation federation); void saveNewFederation(); Federation getOldFederation(); void setOldFederation(Federation federation); void saveOldFederation(); PendingFederation getPendingFederation(); void setPendingFederation(PendingFederation federation); void savePendingFederation(); void saveFederationElection(); ABICallElection getFederationElection(AddressBasedAuthorizer authorizer); void saveLockWhitelist(); LockWhitelist getLockWhitelist(); Coin getFeePerKb(); void setFeePerKb(Coin feePerKb); void saveFeePerKb(); void saveFeePerKbElection(); ABICallElection getFeePerKbElection(AddressBasedAuthorizer authorizer); void save();  }### Answer:
@Test public void getReleaseRequestQueue() throws IOException { List<Integer> calls = new ArrayList<>(); ReleaseRequestQueue requestQueueMock = mock(ReleaseRequestQueue.class); PowerMockito.mockStatic(BridgeSerializationUtils.class); Repository repositoryMock = mock(Repository.class); BridgeStorageProvider storageProvider = new BridgeStorageProvider(repositoryMock, mockAddress("aabbccdd"), config.getBlockchainConfig().getCommonConstants().getBridgeConstants(), bridgeStorageConfigurationAtHeightZero); when(repositoryMock.getStorageBytes(any(UscAddress.class), any(DataWord.class))).then((InvocationOnMock invocation) -> { calls.add(0); UscAddress contractAddress = invocation.getArgumentAt(0, UscAddress.class); DataWord address = invocation.getArgumentAt(1, DataWord.class); Assert.assertTrue(Arrays.equals(new byte[]{(byte)0xaa, (byte)0xbb, (byte)0xcc, (byte)0xdd}, contractAddress.getBytes())); Assert.assertEquals(new DataWord("releaseRequestQueue".getBytes(StandardCharsets.UTF_8)), address); return new byte[]{(byte)0xaa}; }); PowerMockito.when(BridgeSerializationUtils.deserializeReleaseRequestQueue(any(byte[].class), any(NetworkParameters.class))).then((InvocationOnMock invocation) -> { calls.add(0); byte[] data = invocation.getArgumentAt(0, byte[].class); NetworkParameters parameters = invocation.getArgumentAt(1, NetworkParameters.class); Assert.assertEquals(NetworkParameters.fromID(NetworkParameters.ID_REGTEST), parameters); Assert.assertTrue(Arrays.equals(new byte[]{(byte)0xaa}, data)); return requestQueueMock; }); Assert.assertSame(requestQueueMock, storageProvider.getReleaseRequestQueue()); Assert.assertEquals(2, calls.size()); }