bindings = parse("${ns:f()+v+g(1)+x}").bind(context.getFunctionMapper(), context.getVariableMapper());
assertEquals(bindings, deserialize(serialize(bindings)));
}
public void testEqualsAndHashcode() throws Exception {
Bindings bindings1 = null;
Bindings bindings2 = null;
bindings1 = new Bindings(null, null);
bindings2 = new Bindings(null, null);
assertEquals(bindings1, bindings2);
assertEquals(bindings1.hashCode(), bindings2.hashCode());
bindings1 = new Bindings(new Method[0], new ValueExpression[0]);
bindings2 = new Bindings(null, null);
assertEquals(bindings1, bindings2);
assertEquals(bindings1.hashCode(), bindings2.hashCode());
Tree tree = parse("${ns:f()+v+g(1)}+x");
bindings1 = tree.bind(context.getFunctionMapper(), context.getVariableMapper());
bindings2 = tree.bind(context.getFunctionMapper(), context.getVariableMapper());
assertEquals(bindings1, bindings2);
assertEquals(bindings1.hashCode(), bindings2.hashCode());
}