void () { ClientState state = getClientState(); if (state == null) { return; } flushMergers(); int commandLevel = state.myCommandLevel; state.myCommandLevel = 0; state.myUndoStacksHolder.clearAllStacksInTests(); state.myRedoStacksHolder.clearAllStacksInTests(); LOG.assertTrue( commandLevel == 0, "Level: " + commandLevel + "\nCommand: " + state.myMerger.getCommandName()); }