### Question:
BridgeSerializationUtils { public static PendingFederation deserializePendingFederation(byte[] data) { return new PendingFederation(deserializeUldPublicKeys(data)); } private  BridgeSerializationUtils(); static byte[] serializeMap(SortedMap<Keccak256, UldTransaction> map); static SortedMap<Keccak256, UldTransaction> deserializeMap(byte[] data, NetworkParameters networkParameters, boolean noInputsTxs); static byte[] serializeUTXOList(List<UTXO> list); static List<UTXO> deserializeUTXOList(byte[] data); static byte[] serializeSet(SortedSet<Sha256Hash> set); static SortedSet<Sha256Hash> deserializeSet(byte[] data); static byte[] serializeMapOfHashesToLong(Map<Sha256Hash, Long> map); static Map<Sha256Hash, Long> deserializeMapOfHashesToLong(byte[] data); static byte[] serializeFederation(Federation federation); static Federation deserializeFederation(byte[] data, Context uldContext); static byte[] serializePendingFederation(PendingFederation pendingFederation); static PendingFederation deserializePendingFederation(byte[] data); static byte[] serializeElection(ABICallElection election); static ABICallElection deserializeElection(byte[] data, AddressBasedAuthorizer authorizer); static byte[] serializeOneOffLockWhitelist(Pair<List<OneOffWhiteListEntry>, Integer> data); static byte[] serializeUnlimitedLockWhitelist(List<UnlimitedWhiteListEntry> entries); static Pair<HashMap<Address, OneOffWhiteListEntry>, Integer> deserializeOneOffLockWhitelistAndDisableBlockHeight(byte[] data, NetworkParameters parameters); static Map<Address, UnlimitedWhiteListEntry> deserializeUnlimitedLockWhitelistEntries(byte[] data, NetworkParameters parameters); static byte[] serializeCoin(Coin coin); @Nullable static Coin deserializeCoin(byte[] data); static byte[] serializeReleaseRequestQueue(ReleaseRequestQueue queue); static ReleaseRequestQueue deserializeReleaseRequestQueue(byte[] data, NetworkParameters networkParameters); static byte[] serializeReleaseTransactionSet(ReleaseTransactionSet set); static ReleaseTransactionSet deserializeReleaseTransactionSet(byte[] data, NetworkParameters networkParameters);  }### Answer:
@Test public void deserializePendingFederation() throws Exception { PowerMockito.mockStatic(RLP.class); mock_RLP_decode2(InnerListMode.NONE); byte[][] publicKeyBytes = Arrays.asList(100, 200, 300, 400, 500, 600).stream() .map(k -> UldECKey.fromPrivate(BigInteger.valueOf(k))) .sorted(UldECKey.PUBKEY_COMPARATOR) .map(k -> k.getPubKey()) .toArray(byte[][]::new); StringBuilder sampleBuilder = new StringBuilder(); sampleBuilder.append("06212121212121"); for (int i = 0; i < publicKeyBytes.length; i++) { sampleBuilder.append(Hex.toHexString(publicKeyBytes[i])); } byte[] sample = Hex.decode(sampleBuilder.toString()); PendingFederation deserializedPendingFederation = BridgeSerializationUtils.deserializePendingFederation(sample); assertEquals(6, deserializedPendingFederation.getPublicKeys().size()); for (int i = 0; i < 6; i++) { Assert.assertTrue(Arrays.equals(publicKeyBytes[i], deserializedPendingFederation.getPublicKeys().get(i).getPubKey())); } }