@@ -0,0 +1,1052 @@
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.%0Apackage com.intellij.testFramework;%0A%0Aimport com.intellij.openapi.Disposable;%0Aimport com.intellij.openapi.components.Service;%0A%0Apublic class LightProjectServiceDisposalTest extends LightPlatformTestCase %7B%0A%0A  @Service%0A  private static final class MyService implements Disposable %7B%0A    boolean myDisposed = false;%0A%0A    @Override%0A    public void dispose() %7B%0A      myDisposed = true;%0A    %7D%0A  %7D%0A%0A  private MyService myServiceInstance;%0A%0A  @Override%0A  public void setUp() throws Exception %7B%0A    super.setUp();%0A    myServiceInstance = getProject().getService(MyService.class);%0A    assertFalse(myServiceInstance.myDisposed);%0A  %7D%0A%0A  public void testDummy() %7B%7D%0A%0A  @Override%0A  public void tearDown() throws Exception %7B%0A    MyService instance = myServiceInstance; // save into a variable, because the field is cleared in #clearFields%0A    super.tearDown();%0A    assertTrue(instance.myDisposed); // the actual test is here%0A  %7D%0A%7D%0A

test light project service is disposed after #tearDown()