ExpandedName name = new ImmutableExpandedName("uri://",
"fred");
ExpandedName other = new MutableExpandedName("uri://",
"jim");
Value value = new SimpleStringValue(factory, "hello");
Variable nameVar = new SimpleVariable(factory,
name,
value);
Variable otherVar = new SimpleVariable(factory,
other,
value);
assertEquals("name for nameVar not as",
name,
nameVar.getName());
assertTrue("name for nameVar not immutable",
nameVar.getName() instanceof ImmutableExpandedName);
assertEquals("name for otherVar not as",
other,
otherVar.getName());
assertTrue("name for otherVar not immutable",
otherVar.getName() instanceof ImmutableExpandedName);
}