@Test public void testRhsEmptyProperties_shouldFail() throws Exception { ProcessBag processBag = new ProcessBag(); Map<String, Object> props = Maps.newHashMap(); props.put("a", "b"); processBag.setProperties(props); assertFalse(processBag.equals(new ProcessBag())); }
@Test public void testSame_shouldSucceed() throws Exception { ProcessBag processBag = new ProcessBag(); processBag.setContext("blub"); processBag.setProcessId("lala"); processBag.setUser("cool"); assertTrue(processBag.equals(processBag)); }
@Test public void testRhsInequalToLhs_shouldFail() throws Exception { ProcessBag processBag = new ProcessBag(); processBag.setContext("blub"); processBag.setProcessId("lala"); processBag.setUser("uncool"); ProcessBag processBag2 = new ProcessBag(); processBag2.setContext("blub"); processBag2.setProcessId("lala"); processBag2.setUser("cool"); assertFalse(processBag.equals(processBag2)); }