@Test
  public void testZTestUniformityFailsOnNonRandomNegativeData() {
    String msg =
        assertThrows(
                GeneralSecurityException.class,
                new ThrowingRunnable() {
                  @Override
                  public void run() throws Throwable {
                    setValueForNBytes(randomBytes, 256, (byte) -120);
                    TestUtil.ztestUniformString(randomBytes);
                  }
                })
            .getMessage();
    assertThat(msg).contains("Z test for uniformly distributed variable out of bounds");
  }
Tests some of the more complex functions from TestUtil.
java_src/src/test/java/com/google/crypto/tink/testing/TestUtilTest.java