private void checkPrimitiveValue(Value value, String name, Object expected)
{
assertNotNull(value);
assertTrue(PrimitiveValue.class.isAssignableFrom(value.getClass()));
PrimitiveValue val = (PrimitiveValue)value;
TypeInfo type = val.getType();
assertTrue(PrimitiveInfo.class.isAssignableFrom(type.getClass()));
assertTrue((type).getName().equals(name));
Object obj;
try
{
obj = type.convertValue(val.getValue());
}
catch (Throwable e)
{
throw new RuntimeException(e);
}