private static Map<Field, Object> getSSLFields(final Object obj, final Class[] classes) {
    Map<Field, Object> resultFields = new HashMap<>();
    Field[] fields = obj.getClass().getDeclaredFields();

    for (Field field : fields) {
      try {
        field.setAccessible(true);
        Object fieldObj = field.get(obj);
        boolean isInstance = false;

        for (final Class aClass : classes) {
          if ((isInstance = aClass.isInstance(fieldObj)) == true) {
            break;
          }
        }

        if (isInstance) {
          resultFields.put(field, fieldObj);
        }

      } catch (IllegalAccessException ex) {
        logger.warn("Exception while getting SSL fields.", ex);
      }
    }
    return resultFields;
  }
This is a hack using reflection to clear the static objects in JSSE since otherwise changing
the javax.* store related properties has no effect during the course of running dunit suite
unless the VMs are restarted.
geode-dunit/src/main/java/org/apache/geode/security/SecurityTestUtils.java