<BUG>Task<String> task = Task.ofType(String.class).named("WithRef").process(() -> instanceField + " causes an outer reference");</BUG><CONTEXT>assertEquals(des.id().name(), "Baz");assertEquals(val.awaitAndGet(), "[9999] hello 10004");}@Test(expected = NotSerializableException.class)public void shouldNotSerializeWithInstanceFieldReference() throws Exception {<extra_id_0>serialize(task);}@Test</CONTEXT>
Task<String> task = Task.named("WithRef").ofType(String.class).process(() -> instanceField + " causes an outer reference");