@Test
public void testSmallPlaintextWithMultipleKeys() throws Exception {

  byte[] primaryKeyValue = Random.randBytes(KEY_SIZE);
  Keyset.Key primary =
      TestUtil.createKey(
          TestUtil.createPrfKeyData(primaryKeyValue),
          /* keyId= */ 5,
          KeyStatusType.ENABLED,
          OutputPrefixType.RAW);
  byte[] secondaryKeyValue = Random.randBytes(KEY_SIZE);
  Keyset.Key secondary =
      TestUtil.createKey(
          TestUtil.createPrfKeyData(secondaryKeyValue),
          /* keyId= */ 6,
          KeyStatusType.ENABLED,
          OutputPrefixType.RAW);
  KeysetHandle keysetHandle =
      TestUtil.createKeysetHandle(TestUtil.createKeyset(primary, secondary));
  byte[] plaintext = "blah".getBytes(UTF_8);
  PrfSet prfSet = new PrfSetWrapper().wrap(Registry.getPrimitives(keysetHandle, PrfSet.class));
  byte[] prsPrimary = prfSet.computePrimary(plaintext, 12);
  byte[] prs5 = prfSet.getPrfs().get(5).compute(plaintext, 12);
  byte[] prs6 = prfSet.getPrfs().get(6).compute(plaintext, 12);
  assertEquals(5, prfSet.getPrimaryId());
  assertThat(prfSet.getPrfs()).hasSize(2);
  assertThat(prsPrimary).hasLength(12);
  assertArrayEquals(prs5, prsPrimary);
  assertThat(prsPrimary).isNotEqualTo(prs6);
}