Embracing the Messiness in Search of Epic Solutions

Month: April 2015

  • Guava: Testing equals(..) and hashcode(..)

    PROBLEM Let’s assume we want to test the following equals(..):- A correctly implemented equals(..) must be reflexive, symmetric, transitive, consistent and handles null comparison. In another word, you have to write test cases to pass at least these 5 rules. Anything less is pure bullshit. SOLUTION You can write these tests yourself… or you can… Read More…