A method of testing a sample for the presence of a target nucleic acid fragment, comprising (i) providing a sample of fragmented nucleic acid; (ii) providing denaturing conditions under which the target fragment is single stranded; (iii) contacting the sample with a nucleic acid probe comprising a targeting oligonucleotide which is longer than the target fragment and contains an internal target-complementary sequence, so that hybridisation between the targeting oligonucleotide and the target fragment forms a double stranded sequence located between an upstream flanking sequence and a downstream flanking sequence of the targeting oligonucleotide, and, a head sequence and a tail sequence having free 5' and 3' ends respectively, wherein the head sequence and tail sequence are complementary to the upstream and the downstream flanking sequences respectively; (iv) providing annealing conditions under which the head and the tail sequences hybridise to the upstream and the downstream flanking sequences, and the target fragment, if present, hybridises to the target-complementary sequence, thereby positioning the ends of the target fragment in juxtaposition with the 5' end of the head sequence and the 3' end of the tail sequence; (v) providing conditions for ligation so that, if the target fragment is present, the 3' end of the target fragment is ligated to the 5' end of the head sequence to form a first ligation junction, and the 5' end of the target fragment is ligated to the 3' end of the tail sequence to form a second ligation junction, producing a product of ligation comprising a circular strand of nucleic acid comprising the head and the tail sequences and the target fragment; and, (vi) detecting whether the product of ligation is present, wherein the presence of the product of ligation indicates the presence of the target fragment in the sample. (i) providing a sample of fragmented nucleic acid; (ii) providing denaturing conditions under which the target fragment is single stranded; (iii) contacting the sample with a nucleic acid probe comprising a targeting oligonucleotide which is longer than the target fragment and contains an internal target-complementary sequence, so that hybridisation between the targeting oligonucleotide and the target fragment forms a double stranded sequence located between an upstream flanking sequence and a downstream flanking sequence of the targeting oligonucleotide, and, a head sequence and a tail sequence having free 5' and 3' ends respectively, wherein the head sequence and tail sequence are complementary to the upstream and the downstream flanking sequences respectively; a targeting oligonucleotide which is longer than the target fragment and contains an internal target-complementary sequence, so that hybridisation between the targeting oligonucleotide and the target fragment forms a double stranded sequence located between an upstream flanking sequence and a downstream flanking sequence of the targeting oligonucleotide, and, a head sequence and a tail sequence having free 5' and 3' ends respectively, wherein the head sequence and tail sequence are complementary to the upstream and the downstream flanking sequences respectively; (iv) providing annealing conditions under which the head and the tail sequences hybridise to the upstream and the downstream flanking sequences, and the target fragment, if present, hybridises to the target-complementary sequence, thereby positioning the ends of the target fragment in juxtaposition with the 5' end of the head sequence and the 3' end of the tail sequence; (v) providing conditions for ligation so that, if the target fragment is present, the 3' end of the target fragment is ligated to the 5' end of the head sequence to form a first ligation junction, and the 5' end of the target fragment is ligated to the 3' end of the tail sequence to form a second ligation junction, producing a product of ligation comprising a circular strand of nucleic acid comprising the head and the tail sequences and the target fragment; and, (vi) detecting whether the product of ligation is present, wherein the presence of the product of ligation indicates the presence of the target fragment in the sample.