@Test
public void shouldIncludeOnlyProvidedAttributes(){
deleteAndPopulateTables("users", "addresses");
User u = User.findById(1);
String xml = u.toXml(true, true, "email", "last_name");
a(XPathHelper.count("/user/*", xml)).shouldEqual(2);
a(XPathHelper.selectText("/user/email", xml)).shouldEqual("mmonroe@yahoo.com");
a(XPathHelper.selectText("/user/last_name", xml)).shouldEqual("Monroe");
a(XPathHelper.count("//first_name", xml)).shouldEqual(0);