void (@NotNull Object action) { assertTrue(application.isWriteIntentLockAcquired()); assertFalse(application.isWriteAccessAllowed()); assertFalse(application.isWriteActionInProgress()); assertFalse(application.isWriteActionPending()); if (nestingCount.get() < 2) { // strange to allow it but this is how a lot of code is application.runWriteAction(() -> { }); } }