ScannerContext { public static Optional<ScannerContext> getScannerContext() { return Optional.ofNullable(threadLocalContext.get()); }  boolean hasExceptions(); String getName(); Map<String, Object> getMap(); ScannerContext withAttribute(String key, Object val); ScannerContext addCleanupTask(CleanupTask task); ScannerContext withCleanupTask(CleanupTask task); static Optional<ScannerContext> getScannerContext(); long getEntityCount(); long incrementEntityCount(); List<Exception> getExceptions(); ScannerContext markException(Exception e); ScannerContext withName(String name); void exec(Invokable x); String toString();  }
@Test public void testNoContext() { Assertions.assertThat(ScannerContext.getScannerContext().isPresent()).isFalse(); }