@Theory
  public void getPrimitiveFromNonStreamingAeadKeyset_throws()
      throws Exception {
    KeysetHandle handle =
        TinkJsonProtoKeysetFormat.parseKeyset(
            JSON_DAEAD_KEYSET, InsecureSecretKeyAccess.get());
    // Test that the keyset can create a DeterministicAead primitive, but not a StreamingAead.
    Object unused = handle.getPrimitive(DeterministicAead.class);
    assertThrows(GeneralSecurityException.class, () -> handle.getPrimitive(StreamingAead.class));
  }
Reads {@code bytesToRead} bytes from {@code readableChannel}.
java_src/src/test/java/com/google/crypto/tink/streamingaead/StreamingAeadTest.java