public void testSerializeNestedChannel() throws Exception {

    ObjectContext child = runtime.newContext(context);

    ObjectContext deserializedContext = Util.cloneViaSerialization(child);

    assertNotNull(deserializedContext.getChannel());
    assertNotNull(deserializedContext.getEntityResolver());
  }
  public void testLocalObject_TempId_NestedContext() throws Exception {

    final Artist a1 = context1.newObject(Artist.class);

    final ObjectContext nestedContext = runtime.newContext(context1);

    interceptor.runWithQueriesBlocked(
        new UnitTestClosure() {

          public void execute() {

            Artist a3 = nestedContext.localObject(a1);
            assertNotSame(a3, a1);
            assertEquals(a3.getObjectId(), a1.getObjectId());
            assertSame(nestedContext, a3.getObjectContext());
          }
        });
  }
 @Override
 public ObjectContext newContext() {
   return runtime.newContext();
 }