@Test public void I_can_check_the_hash_code_of_an_error_message() { final Error left = new Error(ERROR_MESSAGE); final Error right = new Error(new Exception(ERROR_MESSAGE)); assertEquals( "equivalent errors hash codes should be equal.", left.hashCode(), right.hashCode()); assertNotEquals( "different errors hash code not should be equal.", left.hashCode(), new Error("different").hashCode()); assertNotEquals( "an error should not have the same hash cide as an object.", left.hashCode(), new Object().hashCode()); }