@Test
public void testMultipleSetAllowMultiThreadTrue() throws Exception {

    NetworkImpl network = (NetworkImpl) Network.create("testMultipleSetAllowMultiThreadTrue", "no-format");
    VariantManager variantManager = new VariantManagerImpl(network);
    variantManager.allowVariantMultiThreadAccess(true);
    CountDownLatch cdl1 = new CountDownLatch(1);
    Exception[] exceptionThrown = new Exception[1];
    (new Thread() {
        public void run() {
            try {
                variantManager.allowVariantMultiThreadAccess(true);
                exceptionThrown[0] = null;
            } catch (Exception e) {
                exceptionThrown[0] = e;
            } finally {
                cdl1.countDown();
            }
        }
    }).start();
    cdl1.await();
    if (exceptionThrown[0] != null) {
        throw new AssertionError(exceptionThrown[0]);
    }
}