Exemplo n.º 1
0
  @Test
  public void serializeMarried() throws Exception {
    group = createMarriedKeyChainGroup();
    Address address1 = group.currentAddress(KeyChain.KeyPurpose.RECEIVE_FUNDS);
    assertTrue(group.isMarried());

    List<Protos.Key> protoKeys = group.serializeToProtobuf();
    KeyChainGroup group2 = KeyChainGroup.fromProtobufUnencrypted(params, protoKeys);
    assertTrue(group2.isMarried());
    Address address2 = group2.currentAddress(KeyChain.KeyPurpose.RECEIVE_FUNDS);
    assertEquals(address1, address2);
  }
Exemplo n.º 2
0
 @Test
 public void addFollowingAccounts() throws Exception {
   assertFalse(group.isMarried());
   group.addFollowingAccountKeys(ImmutableList.of(watchingAccountKey));
   assertTrue(group.isMarried());
 }