@Test
  public void testFipsOnlyModeEnabledAlgorithmCompatibilityNoBoringCrypto() {
    // Test behavior when FIPS-only mode is used.
    Assume.assumeTrue(TinkFipsUtil.useOnlyFips());
    assertThat(TinkFipsUtil.AlgorithmFipsCompatibility.ALGORITHM_NOT_FIPS.isCompatible()).isFalse();

    // BoringCrypto is not available, therefore no validated implementation is available and
    // the compatibility check must fail.
    Assume.assumeTrue(!TinkFipsUtil.fipsModuleAvailable());
    assertThat(
            TinkFipsUtil.AlgorithmFipsCompatibility.ALGORITHM_REQUIRES_BORINGCRYPTO.isCompatible())
        .isFalse();
  }
Tests for TinkFipsUtil. The tests here check the behavior of Tink when built with or without the
--use_only_fips flag. In order to get complete coverage a build should be tested with: 1) Build
without the --use_only_fips flag. 2) Build with the --use_only_fips flag, and BoringCrypto not
being available. 3) Build with the --use_only_fips flag, and BoringCrypto being available.
java_src/src/test/java/com/google/crypto/tink/config/internal/TinkFipsUtilTest.java