@Override
    public boolean equals(final Object obj) {
        if (!(obj instanceof Instance)) {
            return false;
        }
        
        final Instance host = (Instance) obj;
        return Instance.strEquals(host.toString(), toString());
    }
@Test
    void testEquals() {
        Instance actual = new Instance();
        setInstance(actual);
        actual.setMetadata(new HashMap<>());
        actual.addMetadata("a", "b");
        assertNotEquals(actual, new Object());
        Instance expected = new Instance();
        setInstance(expected);
        expected.setMetadata(new HashMap<>());
        expected.addMetadata("a", "b");
        assertEquals(actual, expected);
        expected.addMetadata("a", "c");
        assertNotEquals(actual, expected);
    }