@Test
public void testInvalidWrappingSizes() throws Exception {

  byte[] wrapKey = Random.randBytes(16);
  KeyWrap wrapper = new Kwp(wrapKey);
  for (int wrappedSize = 0; wrappedSize < 16; wrappedSize++) {
    try {
      wrapper.wrap(new byte[wrappedSize]);
      fail("Should not wrap short keys");
    } catch (GeneralSecurityException ex) {
      // expected
    }
  }
}