public AnnotatedLargeText obtainLog() {
        WeakReference<AnnotatedLargeText> l = log;
        if (l == null) return null;
        return l.get();
    }
@Test
    public void annotatedText() throws Exception {
        MyTaskAction action = new MyTaskAction();
        action.start();
        AnnotatedLargeText annotatedText = action.obtainLog();
        while (!annotatedText.isComplete()) {
            Thread.sleep(10);
        }
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        final long length = annotatedText.writeLogTo(0, os);
        // Windows based systems will be 220, linux base 219
        assertTrue("length should be longer or even 219", length >= 219);
        assertTrue(os.toString(StandardCharsets.UTF_8).startsWith("a linkCompleted"));
    }