def METHOD_NAME(self):
    for i in range(4):
        cert = certificate_pb2.X509Description()
        cert.der = "hello-%d" % i
        cert.subject.extend([name_attribute("com.example" + (".%d" % i)*i)])
        cert.sha256_hash = str(i)
        self.db().store_cert_desc(cert, i, 0)
    matches = {c for c in self.db().scan_certs_by_subject("example.com")}
    self.assertEqual(4, len(matches))
    for i in range(4):
        self.assertTrue("hello-%d" % i in matches)