req.simpleFooRequest().getSimpleFooWithSubPropertyCollection().with(paths).fire(
new Receiver<SimpleFooProxy>() {
@Override
public void onSuccess(SimpleFooProxy response) {
SimpleFooRequest context = req.simpleFooRequest();
driver.edit(response, context);
SimpleFooBarNameOnlyEditor subeditor = editor.selfOneToManyField.getEditors().get(0);
// test context is correctly set in CompositeEditor subeditors
assertSame(context, subeditor.ctx);
context.persistAndReturnSelf().using(response).with(paths).to(
new Receiver<SimpleFooProxy>() {
@Override
public void onSuccess(SimpleFooProxy response) {
assertEquals("EditorBarTest", response.getSelfOneToManyField().get(0)
.getBarField().getUserName());