import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;

import org.junit.Test;

public class HammingTest {
    
    @Test
    public void testNoDifferenceBetweenIdenticalStrands() {
        assertThat(Hamming.compute("A", "A"), is(0));
    }

    @Test
    public void testCompleteHammingDistanceOfForSingleNucleotideStrand() {
        assertThat(Hamming.compute("A", "G"), is(1));
    }

    @Test
    public void testCompleteHammingDistanceForSmallStrand() {
        assertThat(Hamming.compute("AG", "CT"), is(2)); 
    }

    @Test
    public void testSmallHammingDistance() {
        assertThat(Hamming.compute("AT", "CT"), is(1));
    }

    @Test
    public void testSmallHammingDistanceInLongerStrand() {
        assertThat(Hamming.compute("GGACG", "GGTCG"), is(1));
    }

    @Test
    public void testIgnoresExtraLengthOnFirstStrandWhenLonger() {
        assertThat(Hamming.compute("AAAG", "AAA"), is(0));
    }

    @Test
    public void testIgnoresExtraLengthOnOtherStrandWhenLonger() {
        assertThat(Hamming.compute("AAA", "AAAG"), is(0));
    }

    @Test
    public void testLargeHammingDistance() {
        assertThat(Hamming.compute("GATACA", "GCATAA"), is(4));
    }

    @Test
    public void testHammingDistanceInVeryLongStrand() {
        assertThat(Hamming.compute("GGACGGATTCTG", "AGGACGGATTCT"), is(9));
    }

}

@@ -797,32 +797,75 @@
     %7D%0A%0A    @Test
+(expected = IllegalArgumentException.class)
 %0A    public void
@@ -869,36 +869,25 @@
 oid test
-IgnoresExtraLengthOn
+Validates
 FirstStr
@@ -885,28 +885,27 @@
 sFirstStrand
-When
+Not
 Longer() %7B%0A 
@@ -907,35 +907,24 @@
 ) %7B%0A        
-assertThat(
 Hamming.comp
@@ -941,24 +941,16 @@
 , %22AAA%22)
-, is(0))
 ;%0A    %7D%0A
@@ -951,32 +951,75 @@
     %7D%0A%0A    @Test
+(expected = IllegalArgumentException.class)
 %0A    public void
@@ -1027,28 +1027,17 @@
 test
-IgnoresExtraLengthOn
+Validates
 Othe
@@ -1047,12 +1047,11 @@
 rand
-When
+Not
 Long
@@ -1061,35 +1061,24 @@
 ) %7B%0A        
-assertThat(
 Hamming.comp
@@ -1095,24 +1095,16 @@
  %22AAAG%22)
-, is(0))
 ;%0A    %7D%0A

Fix hamming test for different strand lengths