import java.io.InputStream;
import java.net.URI;
import java.text.ParseException;
-import java.text.SimpleDateFormat;
import java.util.Collection;
import javax.ws.rs.core.MediaType;
import org.junit.BeforeClass;
import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.QNameModule;
+import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodes;
import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
private static QNameModule initializeInstanceIdentifierModule() {
try {
return QNameModule.create(URI.create("instance:identifier:module"),
- new SimpleDateFormat("yyyy-MM-dd").parse("2014-01-17"));
+ SimpleDateFormatUtil.getRevisionFormat().parse("2014-01-17"));
} catch (final ParseException e) {
throw new Error(e);
}
final Collection<File> testFiles = TestRestconfUtils.loadFiles("/instanceidentifier/yang");
testFiles.addAll(TestRestconfUtils.loadFiles("/modules"));
schemaContext = YangParserTestUtils.parseYangSources(testFiles);
- controllerContext.setSchemas(schemaContext);
- when(mountPointServiceHandler.get()).thenReturn(mock(DOMMountPointService.class));
+ CONTROLLER_CONTEXT.setSchemas(schemaContext);
+ when(MOUNT_POINT_SERVICE_HANDLER.get()).thenReturn(mock(DOMMountPointService.class));
}
@Test
final QName augmentChoice1QName = QName.create(augmentModule.getQNameModule(), "augment-choice1");
final QName augmentChoice2QName = QName.create(augmentChoice1QName, "augment-choice2");
final QName containerQName = QName.create(augmentChoice1QName, "case-choice-case-container1");
- final YangInstanceIdentifier.AugmentationIdentifier augChoice1II = new YangInstanceIdentifier.AugmentationIdentifier(
- Sets.newHashSet(augmentChoice1QName));
- final YangInstanceIdentifier.AugmentationIdentifier augChoice2II = new YangInstanceIdentifier.AugmentationIdentifier(
- Sets.newHashSet(augmentChoice2QName));
+ final YangInstanceIdentifier.AugmentationIdentifier augChoice1II =
+ new YangInstanceIdentifier.AugmentationIdentifier(Sets.newHashSet(augmentChoice1QName));
+ final YangInstanceIdentifier.AugmentationIdentifier augChoice2II =
+ new YangInstanceIdentifier.AugmentationIdentifier(Sets.newHashSet(augmentChoice2QName));
final YangInstanceIdentifier dataII = YangInstanceIdentifier.of(dataSchemaNode.getQName()).node(augChoice1II)
.node(augmentChoice1QName).node(augChoice2II).node(augmentChoice2QName).node(containerQName);
final String uri = "instance-identifier-module:cont";