title: Is Java jackson ObjectWriter.ObjectWriter.writeValueAsString(obj); stable?
body: <p>I am currently writing test cases using TestNg. I populate objects using PodamFactory. I have following test case structure.</p>
  
  <pre><code>@Test
  public void testIt(){ 
  ARespObject resp = PodamFactory.manufacturePojo(ARespObject.class);
  String responseXml = new JaxbStringTransformer().transform(resp);
  
  // a new object with all the same data
  ARespObject respActual = responder.getObj(responseXml);
  
  Assert.assertTrue(TestUtils.areEqual(respActual , resp));
  }
  
  public static &lt;T extends Object&gt; boolean areEqual(T sourceObj, T target) {
      if (sourceObj == null &amp;&amp; target == null) {
          return true;
      }
      if (sourceObj == target) {
          return true;
      }
      if (sourceObj.getClass() != target.getClass()) {
          return false;
      }
      if (sourceObj != null &amp;&amp; target != null) {
          return stringifyObject(sourceObj).equals(stringifyObject(target));
      }
  
      return false;
  }
  
  public static String stringifyObject(Object obj) {
      String result = "";
      ObjectWriter ow = new JaxbJacksonObjectMapper().writer().withDefaultPrettyPrinter();
      try {
          result = ow.writeValueAsString(obj);
      } catch (JsonGenerationException e1) {
          LOG.error(e1);
      } catch (JsonMappingException e1) {
          LOG.error("JsonMappingException: " + e1);
      } catch (IOException e1) {
          LOG.error("IOException: " + e1);
      }
      return result;
  }
  </code></pre>
  
  <p>I need to know if writeValueAsString(obj) will always provide same structure for both objects(i.e. its output will be stable) and following</p>
  
  <pre><code>stringifyObject(sourceObj).equals(stringifyObject(target));
  </code></pre>
  
  <p>is a valid check. I am concerned about whether it will ever give me different ordering of variables inside the ARespObject.</p>