@Test
  public void withFips_nonFipsKeyTypesAreNotRegistered() throws Exception {
    Assume.assumeTrue(TinkFips.useOnlyFips());
    Assume.assumeTrue(TinkFipsUtil.fipsModuleAvailable());

    AeadConfig.register();

    assertThrows(
        GeneralSecurityException.class,
        () -> KeysetHandle.generateNew(PredefinedAeadParameters.AES128_EAX));
    assertThrows(
        GeneralSecurityException.class,
        () -> KeysetHandle.generateNew(AesGcmSivParameters.builder().setKeySizeBytes(16).build()));
    assertThrows(
        GeneralSecurityException.class,
        () -> KeysetHandle.generateNew(PredefinedAeadParameters.CHACHA20_POLY1305));
    assertThrows(
        GeneralSecurityException.class,
        () -> KeysetHandle.generateNew(PredefinedAeadParameters.XCHACHA20_POLY1305));
  }
Tests for AeadConfig. Using FixedMethodOrder to ensure that aaaTestInitialization runs first, as
it tests execution of a static block within AeadConfig-class.
java_src/src/test/java/com/google/crypto/tink/aead/AeadConfigTest.java