2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.data.api;
10 import static org.junit.Assert.assertFalse;
11 import static org.junit.Assert.fail;
12 import com.google.common.collect.UnmodifiableIterator;
13 import org.junit.Test;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
16 public class PathArgumentListTest {
17 private static final class TestClass extends PathArgumentList {
19 public UnmodifiableIterator<PathArgument> iterator() {
24 public PathArgument get(final int index) {
35 public void testIsEmpty() {
36 assertFalse(new TestClass().isEmpty());
40 public void testProtections() {
41 final PathArgumentList l = new TestClass();
46 } catch (UnsupportedOperationException e) {
52 } catch (UnsupportedOperationException e) {
58 } catch (UnsupportedOperationException e) {
64 } catch (UnsupportedOperationException e) {
70 } catch (UnsupportedOperationException e) {
76 } catch (UnsupportedOperationException e) {