title: How to clear static method status during junit test
body: <p>The test function <code>test_init_1()</code> succeed, but <code>test_init_2()</code> fails 
  That is because <code>MyService</code> has been already initialized.</p>
  
  <pre><code>@RunWith(RobolectricTestRunner::class)
  class TrackingServiceInitTest {
      @Test
      fun test_init_1() {
          val result = MyService.init(context, id1) 
          assertTrue(result)  // result = `true`
      }
  
      @Test
      fun test_init_2() {
          val result = MyService.init(context, id2) 
          assertTrue(result)  // AlreadyInitialized Exception has thrown!
      }
  
      @After
      fun tearDown() {
          // what should I do here to clear MyService's state?
      }
  }
  </code></pre>
  
  <p>MyService looks like:</p>
  
  <pre><code>public class MyService {
      public static synchronized boolean init(Context context) {
          if (sharedInstance != null) {
              Log.d(TAG, "Already initialized!");
              throw new AlreadyInitialized();
          }
  
          // initializing.. 
          sharedInstance = new CoreService();
          return true
      }
  }
  </code></pre>
  
  <p>How can I clear such status?</p>