input: Write a function to implement a hash table in Python that supports insert, delete, and retrieve operations. This hash table should handle possible collisions using chaining. Create a class named `HashTable` with appropriate methods. The hash table size should be 256. Include unit tests using `assert` to validate the functionality of the hash table.
  assert insert(1, 'apple')==True
  assert insert(2, 'banana')==True
  assert retrieve(1)=='apple'
  assert retrieve(2)=='banana'
  assert delete(1)==True
  assert retrieve(1)==None
  assert insert(2, 'cherry')==True
  assert retrieve(2)=='cherry'
output: class HashTable:
      def __init__(self):
          self.size = 256
          self.table = [[] for _ in range(self.size)]
  
      def _hash(self, key):
          return key % self.size
  
      def insert(self, key, value):
          hash_key = self._hash(key)
          for i, (k, v) in enumerate(self.table[hash_key]):
              if k == key:
                  self.table[hash_key][i] = (key, value)
                  return True
          self.table[hash_key].append((key, value))
          return True
  
      def retrieve(self, key):
          hash_key = self._hash(key)
          for k, v in self.table[hash_key]:
              if k == key:
                  return v
          return None
  
      def delete(self, key):
          hash_key = self._hash(key)
          for i, (k, v) in enumerate(self.table[hash_key]):
              if k == key:
                  del self.table[hash_key][i]
                  return True
          return False