public static Keyset createKeyset(Key primary, Key... keys) throws Exception {
    Keyset.Builder builder = Keyset.newBuilder();
    builder.addKey(primary).setPrimaryKeyId(primary.getKeyId());
    for (Key key : keys) {
      builder.addKey(key);
    }
    return builder.build();
  }
@return a keyset from a list of keys. The first key is primary.
java_src/src/main/java/com/google/crypto/tink/testing/TestUtil.java