public Collection<String> getSharedWaitersAndHolders() {
    return Collections.unmodifiableSet(mSharedLockHolders.keySet());
  }
@Test
  // TODO(jiacheng): run this test before committing
  public void testGetStateLockSharedWaitersAndHolders() throws Throwable {
    final StateLockManager stateLockManager = new StateLockManager();

    assertEquals(0, stateLockManager.getSharedWaitersAndHolders().size());

    for (int i = 1; i < 10; i++) {
      StateLockingThread sharedHolderThread = new StateLockingThread(stateLockManager, false);
      sharedHolderThread.start();
      sharedHolderThread.waitUntilStateLockAcquired();
      final Collection<String> sharedWaitersAndHolders =
          stateLockManager.getSharedWaitersAndHolders();
      assertEquals(i, sharedWaitersAndHolders.size());
      assertTrue(sharedWaitersAndHolders.contains(
          sharedHolderThread.getName()));
    }
  }