@Test
  public void testConscryptUsedAsProviderForMac() throws Exception {
    Provider p = Conscrypt.newProvider();
    Security.addProvider(p);
    String conscryptName = p.getName();

    assertThat(EngineFactory.MAC.getInstance("HMACSHA1").getProvider().getName())
        .isEqualTo(conscryptName);
    assertThat(EngineFactory.MAC.getInstance("HMACSHA224").getProvider().getName())
        .isEqualTo(conscryptName);
    assertThat(EngineFactory.MAC.getInstance("HMACSHA256").getProvider().getName())
        .isEqualTo(conscryptName);
    assertThat(EngineFactory.MAC.getInstance("HMACSHA384").getProvider().getName())
        .isEqualTo(conscryptName);
    assertThat(EngineFactory.MAC.getInstance("HMACSHA512").getProvider().getName())
        .isEqualTo(conscryptName);
  }
Tests for EngineFactory when Tink is build in FIPS-mode.
java_src/src/test/java/com/google/crypto/tink/subtle/EngineFactoryFipsTest.java