package com.github.davidmoten.guavamini;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import com.github.davidmoten.junit.Asserts;

public class ObjectsTest {

    @Test
    public void testHashCode() {
        assertEquals(4798, Objects.hashCode(123, 24));
    }

    @Test
    public void isUtilityClass() {
        Asserts.assertIsUtilityClass(Objects.class);
    }

    @Test
    public void nullEqualsNull() {
        assertTrue(Objects.equal(null, null));
    }

    @Test
    public void nullDoesNotEqualNotNull() {
        assertFalse(Objects.equal(null, 123));
    }

    @Test
    public void notNullDoesNotEqualNull() {
        assertFalse(Objects.equal(123, null));
    }

    @Test
    public void objectsAreEqual() {
        assertTrue(Objects.equal("a", "a"));
    }

    @Test
    public void objectsAreNotEqual() {
        assertFalse(Objects.equal("a", "b"));
    }

}

@@ -168,16 +168,46 @@
 tTrue;%0A%0A
+import java.math.BigDecimal;%0A%0A
 import o
@@ -910,32 +910,181 @@
 , %22a%22));%0A    %7D%0A%0A
+    @Test%0A    public void objectsAreEqualWithDifferentReferences() %7B%0A        assertTrue(Objects.equal(new BigDecimal(1), new BigDecimal(1)));%0A    %7D%0A%0A
     @Test%0A    pu

add missing branch coverage, now at 100% line and branch coverage