@Override
 public Color getBackground() {
   if (recording) {
     methodInvocations.invoked("getBackground");
   }
   return super.getBackground();
 }
 MethodInvocations requireInvoked(String methodName) {
   return methodInvocations.requireInvoked(methodName);
 }