Add isOccupied method and test