private static boolean eq(Object left, Object right) {
    return  left == null ? right == null : right != null && left.equals(right);
  }
Equals check that accounts for nulls.

@param left   the left object
@param right  the right object

@return true if the left and right object are equal or both null
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java