@Test
public void testGetSetProperties() throws Exception {

    Properties propsIn = new Properties();
    try {
        final String expectHash = "SHA3"; // use something different than default!
        propsIn.setProperty(Config.SECURITY_LEVEL, "384");
        propsIn.setProperty(Config.HASH_ALGORITHM, expectHash);
        //    testCrypto.setProperties(propsIn);
        //   testCrypto.init();
        CryptoSuite testCrypto = CryptoSuiteFactory.getDefault().getCryptoSuite(propsIn);
        //          assertEquals(BouncyCastleProvider.class, getField(testCrypto, "SECURITY_PROVIDER").getClass());
        String expectedCurve = config.getSecurityCurveMapping().get(384);
        assertEquals("secp384r1", expectedCurve);
        assertEquals(expectedCurve, getField(testCrypto, "curveName"));
        assertEquals(384, getField(testCrypto, "securityLevel"));
        Properties cryptoProps = ((CryptoPrimitives) testCrypto).getProperties();
        assertEquals(cryptoProps.getProperty(Config.SECURITY_LEVEL), "384");
        cryptoProps = testCrypto.getProperties();
        assertEquals(cryptoProps.getProperty(Config.HASH_ALGORITHM), expectHash);
        assertEquals(expectHash, getField(testCrypto, "hashAlgorithm"));
        assertEquals(cryptoProps.getProperty(Config.SECURITY_LEVEL), "384");
        // Should be exactly same instance as it has the same properties.
        assertEquals(testCrypto, CryptoSuiteFactory.getDefault().getCryptoSuite(propsIn));
    } catch (CryptoException | InvalidArgumentException e) {
        fail("testGetSetProperties should not throw exception. Error: " + e.getMessage());
    }
}