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

    assertThat(EngineFactory.SIGNATURE.getInstance("SHA256withRSA").getProvider().getName())
        .isEqualTo(conscryptName);
    assertThat(EngineFactory.SIGNATURE.getInstance("SHA384withRSA").getProvider().getName())
        .isEqualTo(conscryptName);
    assertThat(EngineFactory.SIGNATURE.getInstance("SHA512withRSA").getProvider().getName())
        .isEqualTo(conscryptName);
    assertThat(EngineFactory.SIGNATURE.getInstance("SHA256withRSAandMGF1").getProvider().getName())
        .isEqualTo(conscryptName);
    assertThat(EngineFactory.SIGNATURE.getInstance("SHA384withRSAandMGF1").getProvider().getName())
        .isEqualTo(conscryptName);
    assertThat(EngineFactory.SIGNATURE.getInstance("SHA512withRSAandMGF1").getProvider().getName())
        .isEqualTo(conscryptName);
    assertThat(EngineFactory.SIGNATURE.getInstance("SHA256withECDSA").getProvider().getName())
        .isEqualTo(conscryptName);
    assertThat(EngineFactory.SIGNATURE.getInstance("SHA384withECDSA").getProvider().getName())
        .isEqualTo(conscryptName);
    assertThat(EngineFactory.SIGNATURE.getInstance("SHA512withECDSA").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