@Test
public void testSmallPlaintextWithRawKey() throws Exception {

  byte[] keyValue = Random.randBytes(HMAC_KEY_SIZE);
  Key primary = TestUtil.createKey(
      TestUtil.createHmacKeyData(keyValue, 16),
      42,
      KeyStatusType.ENABLED,
      OutputPrefixType.RAW);
  KeysetHandle keysetHandle = TestUtil.createKeysetHandle(
      TestUtil.createKeyset(primary));
  Mac mac = new MacWrapper().wrap(Registry.getPrimitives(keysetHandle, Mac.class));
  byte[] plaintext = "blah".getBytes("UTF-8");
  byte[] tag = mac.computeMac(plaintext);
  // no prefix
  assertEquals(16 /* TAG */, tag.length);
  try {
    mac.verifyMac(tag, plaintext);
  } catch (GeneralSecurityException e) {
    fail("Valid MAC, should not throw exception");
  }
}