public static void setup() {
    StructContext sc = new StructContext(null, null, null);
    DecompilerContext context = new DecompilerContext(
      new HashMap<>(),
      new PrintStreamLogger(System.out),
      sc,
      new ClassesProcessor(sc),
      null);
    DecompilerContext.setCurrentContext(context);
  }
Sets up enough data for statements to work outside of a decompiler setting.
test/org/jetbrains/java/decompiler/MinimalFernflowerEnvironment.java