/** * should set audit info if any item in the location tag is edited * * @see LocationService#saveLocationTag(LocationTag) */ @Test public void saveLocationTag_shouldSetAuditInfoIfAnyItemInTheLocationTagIsEdited() { LocationService ls = Context.getLocationService(); LocationTag tag = ls.getLocationTag(1); Assert.assertNull(tag.getDateChanged()); Assert.assertNull(tag.getChangedBy()); tag.setName("testing"); tag.setDescription("desc"); LocationTag editedTag = Context.getLocationService().saveLocationTag(tag); Context.flushSession(); Assert.assertNotNull(editedTag.getDateChanged()); Assert.assertNotNull(editedTag.getChangedBy()); }