Collections.singletonMap("g", "g2"));
final List<?> result1 = context.performQuery(q1);
assertEquals(1, result1.size());
clientServerInterceptor.runWithQueriesBlocked(new UnitTestClosure() {
public void execute() {
List<?> result2 = context.performQuery(q1);
assertSame(result1, result2);
}
});
final List<?> result3 = context.performQuery(q2);
assertNotSame(result1, result3);
assertEquals(1, result3.size());
clientServerInterceptor.runWithQueriesBlocked(new UnitTestClosure() {
public void execute() {
List<?> result4 = context.performQuery(q2);
assertSame(result3, result4);