package org.opendaylight.controller.sal.binding.test;
import static org.junit.Assert.assertNotNull;
+
import org.opendaylight.yangtools.yang.binding.Augmentable;
import org.opendaylight.yangtools.yang.binding.Augmentation;
public class AugmentationVerifier<T extends Augmentable<T>> {
- private T object;
+ private final T object;
public AugmentationVerifier(T objectToVerify) {
this.object = objectToVerify;
public static <T extends Augmentable<T>> void assertHasAugmentation(T object,
Class<? extends Augmentation<T>> augmentation) {
assertNotNull(object);
- assertNotNull("Augmentation " + augmentation.getSimpleName() + " is not present.", object.getAugmentation(augmentation));
+ assertNotNull("Augmentation " + augmentation.getSimpleName() + " is not present.",
+ object.getAugmentation(augmentation));
}
public static <T extends Augmentable<T>> AugmentationVerifier<T> from(T obj) {
return new AugmentationVerifier<>(obj);
}
-
}