Migrate users of deprecated yang.common methods
[mdsal.git] / binding / mdsal-binding-dom-adapter / src / test / java / org / opendaylight / mdsal / binding / dom / adapter / FutureSchemaTest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.mdsal.binding.dom.adapter;
9
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertFalse;
12 import static org.junit.Assert.assertNotNull;
13
14 import com.google.common.collect.ImmutableSet;
15 import java.util.concurrent.TimeUnit;
16 import org.junit.Test;
17 import org.opendaylight.yangtools.yang.common.QNameModule;
18
19 public class FutureSchemaTest {
20     @Test
21     public void basicTest() {
22         final FutureSchema futureSchema = FutureSchema.create(0, TimeUnit.MICROSECONDS, true);
23         assertNotNull(futureSchema);
24         assertFalse(futureSchema.waitForSchema(QNameModule.of("test")));
25         assertFalse(futureSchema.waitForSchema(ImmutableSet.of()));
26         assertEquals(0, futureSchema.getDuration());
27         assertEquals(TimeUnit.MICROSECONDS, futureSchema.getUnit());
28     }
29 }