@Test
public void testEqualsForAllTypes() throws Exception {

  List<MyAttributeValue> arguments = new ArrayList<MyAttributeValue>();
  // String
  arguments.clear();
  arguments.add(new MyAttributeValueString("hello", null));
  arguments.add(new MyAttributeValueString("hello", null));
  assertTrue(evaulateFunction(new URI("urn:oasis:names:tc:xacml:1.0:function:string-equal"),
      arguments));
  assertFalse(evaulateFunction(new URI("urn:abc4trust:1.0:function:string-not-equal"), arguments));
  // Boolean
  arguments.clear();
  arguments.add(new MyAttributeValueBoolean(Boolean.valueOf(true), null));
  arguments.add(new MyAttributeValueBoolean(true, null));
  assertTrue(evaulateFunction(new URI("urn:oasis:names:tc:xacml:1.0:function:boolean-equal"),
      arguments));
  assertFalse(evaulateFunction(new URI("urn:abc4trust:1.0:function:boolean-not-equal"), arguments));
  // Integer
  arguments.clear();
  arguments.add(new MyAttributeValueInteger(Integer.valueOf(42), null));
  arguments.add(new MyAttributeValueInteger(BigInteger.valueOf(42), null));
  assertTrue(evaulateFunction(new URI("urn:oasis:names:tc:xacml:1.0:function:integer-equal"),
      arguments));
  assertFalse(evaulateFunction(new URI("urn:abc4trust:1.0:function:integer-not-equal"), arguments));
  // Date with timezone
  arguments.clear();
  arguments.add(new MyAttributeValueDate("2011-12-04Z", null));
  arguments.add(new MyAttributeValueDate("2011-12-04Z", null));
  assertTrue(evaulateFunction(new URI("urn:oasis:names:tc:xacml:1.0:function:date-equal"),
      arguments));
  assertFalse(evaulateFunction(new URI("urn:abc4trust:1.0:function:date-not-equal"), arguments));
  // Date without timezone
  arguments.clear();
  arguments.add(new MyAttributeValueDate("2011-12-04", null));
  arguments.add(new MyAttributeValueDate("2011-12-04", null));
  assertTrue(evaulateFunction(new URI("urn:oasis:names:tc:xacml:1.0:function:date-equal"),
      arguments));
  // Date with and without timezone
  arguments.clear();
  arguments.add(new MyAttributeValueDate("2011-12-04Z", null));
  arguments.add(new MyAttributeValueDate("2011-12-04", null));
  assertTrue(evaulateFunction(new URI("urn:oasis:names:tc:xacml:1.0:function:date-equal"),
      arguments));
  // Time without timezone
  arguments.clear();
  arguments.add(new MyAttributeValueTime("17:39:42", null));
  arguments.add(new MyAttributeValueTime("17:39:42", null));
  assertTrue(evaulateFunction(new URI("urn:oasis:names:tc:xacml:1.0:function:time-equal"),
      arguments));
  // DateTime with timezone
  arguments.clear();
  arguments.add(new MyAttributeValueDateTime("2011-12-04T17:42:42Z", null));
  arguments.add(new MyAttributeValueDateTime("2011-12-04T17:42:42Z", null));
  assertTrue(evaulateFunction(new URI("urn:oasis:names:tc:xacml:1.0:function:dateTime-equal"),
      arguments));
  // DateTime without timezone
  arguments.clear();
  arguments.add(new MyAttributeValueDateTime("2011-12-04T17:43:14", null));
  arguments.add(new MyAttributeValueDateTime("2011-12-04T17:43:14", null));
  assertTrue(evaulateFunction(new URI("urn:oasis:names:tc:xacml:1.0:function:dateTime-equal"),
      arguments));
  assertFalse(evaulateFunction(new URI("urn:abc4trust:1.0:function:dateTime-not-equal"),
      arguments));
  // DateTime with and without timezone
  arguments.clear();
  arguments.add(new MyAttributeValueDateTime("2011-12-04T17:43:14Z", null));
  arguments.add(new MyAttributeValueDateTime("2011-12-04T17:43:14", null));
  assertTrue(evaulateFunction(new URI("urn:oasis:names:tc:xacml:1.0:function:dateTime-equal"),
      arguments));
  // DateTime across timezone (same)
  arguments.clear();
  arguments.add(new MyAttributeValueDateTime("2011-12-04T19:44:15+02:00", null));
  arguments.add(new MyAttributeValueDateTime("2011-12-04T11:44:15-06:00", null));
  assertTrue(evaulateFunction(new URI("urn:oasis:names:tc:xacml:1.0:function:dateTime-equal"),
      arguments));
  // URI
  arguments.clear();
  arguments.add(new MyAttributeValueUri(new URI("abc4trust.eu/blabla"), null));
  arguments.add(new MyAttributeValueUri(new URI("abc4trust.eu/blabla"), null));
  assertTrue(evaulateFunction(new URI("urn:oasis:names:tc:xacml:1.0:function:anyURI-equal"),
      arguments));
  assertFalse(evaulateFunction(new URI("urn:abc4trust:1.0:function:anyURI-not-equal"), arguments));
}