+ doReturn(new EnumResolver() {
+ @Override
+ public String fromYang(final String enumType, final String enumYangValue) {
+ return Preconditions.checkNotNull(getEnumMapping().get(enumYangValue),
+ "Unable to resolve enum value %s, for enum %s with mappings %s", enumYangValue, enumType, getEnumMapping());
+ }
+
+ @Override
+ public String toYang(final String enumType, final String enumYangValue) {
+ return Preconditions.checkNotNull(getEnumMapping().inverse().get(enumYangValue),
+ "Unable to resolve enum value %s, for enum %s with mappings %s", enumYangValue, enumType, getEnumMapping().inverse());
+ }
+ }).when(this.yangStoreSnapshot).getEnumResolver();