@Override
    public void onCopied(Item src, Item item) {
        // bug 5056825 - Display name field should be cleared when you copy a job within the same folder.
        if (item instanceof AbstractItem && src.getParent() == item.getParent()) {
            AbstractItem dest = (AbstractItem) item;
            try {
                dest.setDisplayName(null);
            } catch (IOException ioe) {
                LOGGER.log(Level.WARNING, String.format("onCopied():Exception while trying to clear the displayName for Item.name:%s", item.getName()), ioe);
            }
        }
    }
@Test
    public void testOnCopied() throws Exception {
        DisplayNameListener listener = new DisplayNameListener();
        StubJob src = new StubJob();
        src.doSetName("src");
        StubJob dest = new StubJob();
        dest.doSetName("dest");
        dest.setDisplayName("this should be cleared");

        // make sure the displayname and the name are different at this point
        assertNotEquals(dest.getName(), dest.getDisplayName());

        listener.onCopied(src, dest);
        // make sure the displayname is equals to the name as it should be null
        assertEquals(dest.getName(), dest.getDisplayName());
    }