@Override protected boolean addToRemoteDispatcher(MasterProcedureEnv env, ServerName targetServer) { // So, mock the ServerCrashProcedure nulling out the targetServer AFTER updateTransition // has been called and BEFORE updateTransition gets to here. // We used to throw a NullPointerException. Now we just say the assign failed so it will // be rescheduled. boolean b = super.addToRemoteDispatcher(env, null); assertFalse(b); // Assert we were actually called. this.addToRemoteDispatcherWasCalled.set(true); return b; }