RemoteSampleListener rtl = new RemoteSampleListenerImpl(item);
if (item instanceof TestStateListener && item instanceof SampleListener) { // TL - all
RemoteListenerWrapper wrap = new RemoteListenerWrapper(rtl);
subTree.replace(item, wrap);
} else if (item instanceof TestStateListener) {
RemoteTestListenerWrapper wrap = new RemoteTestListenerWrapper(rtl);
subTree.replace(item, wrap);
} else if (item instanceof SampleListener) {
RemoteSampleListenerWrapper wrap = new RemoteSampleListenerWrapper(rtl);
subTree.replace(item, wrap);
} else {