@Test
public void testTryWithResourceNoThrottle() throws Exception {

    LearnerSnapshotThrottler throttler = new LearnerSnapshotThrottler(1);
    for (int i = 0; i < 3; i++) {
        LearnerSnapshot snapshot = throttler.beginSnapshot(false);
        try {
            Assert.assertFalse(snapshot.isEssential());
            Assert.assertEquals(1, snapshot.getConcurrentSnapshotNumber());
        } finally {
            snapshot.close();
        }
    }
}