@Test public void testCopyIdentifierGlobalExporterTwoValues() throws Exception { StatelessSession session = getSession(); session.setGlobalExporter(new CopyIdentifiersGlobalExporter(new String[] {"list", "cheesery"})); StatelessSessionResult result = session.executeWithResults((Object) null); assertSame(this.list, result.getGlobal("list")); // cheesery should be null assertSame(this.cheesery, result.getGlobal("cheesery")); assertNotSame(this.globalResolver, result.getGlobalResolver()); }
@Test public void testReferenceOriginalGlobalExporter() throws Exception { StatelessSession session = getSession(); // I've not specified any identifiers, so it should do them alll session.setGlobalExporter(new ReferenceOriginalGlobalExporter()); StatelessSessionResult result = session.executeWithResults((Object) null); assertSame(this.list, result.getGlobal("list")); // cheesery should be null assertSame(this.cheesery, result.getGlobal("cheesery")); assertSame(this.globalResolver, result.getGlobalResolver()); }