Fix process-* methods of test middleware