public function testRemove()
 {
     // Remove the following lines when you implement this test.
     $this->assertFalse($this->object->remove(89));
     $this->assertTrue($this->object->remove(5));
     $this->assertFalse($this->object->contains(5));
 }
 function testAddInvalidElement()
 {
     $set = new HashSet("string");
     $this->expectException("IllegalArgumentException");
     $set->add(1223);
     $this->assertFalse($set->contains("Hello there"));
 }
 public function classImplementsComparatorInterface()
 {
     $class = $this->classloader->loadClass($this->classname);
     $interface = XPClass::forName('util.Comparator');
     $interfaces = new HashSet();
     $interfaces->addAll($class->getInterfaces());
     $this->assertTrue($interfaces->contains($interface));
 }
 public function hashSetAddElement()
 {
     $s = new HashSet();
     $s[] = new String('X');
     $this->assertTrue($s->contains(new String('X')));
 }