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