title: Hamcrest - Elegant way to test complex object with samepropertyvaluesas
body: <p>I have quite complex object structure (with bunch of primitive fields and object references) and want to test all fields except -a few- of them. As an example;</p>
  
  <pre><code>ComplexObject actual = generateMagically("someInput");
  ComplexObject expected = ActualFunction.instance.workMagically(actual);
  
  // we want to be sure that workMagically() would create a new ComplexObject
  // with some fields are different than "actual" object.
  
  // assertThat(actual, samePropertyValuesAs(expected)); would check all fields.
  // what I want is actually; - notice that "fieldName1" and "fieldName2" are 
  // primitives belong to ComplexObject
  assertThat(actual, samePropertyValuesExceptAs(expected, "fieldName1", "fieldName2"))
  </code></pre>
  
  <p>Since I don't want to check all fields manually, I believe there must be a way to write that test elegantly. Any ideas?</p>
  
  <p>Cheers.</p>