
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.junit.Ignore;

public class PythagoreanTripletTest {

    @Test
    public void shouldCalculateSum() {
        PythagoreanTriplet sut = new PythagoreanTriplet(3, 4, 5);
        final int expected = 12;
        final int actual = sut.calculateSum();
        assertEquals(expected, actual);
    }

    @Test
    @Ignore("Remove to run test")
    public void shouldCalculateProduct() {
        PythagoreanTriplet sut = new PythagoreanTriplet(3, 4, 5);
        final long expected = 60l;
        final long actual = sut.calculateProduct();
        assertEquals(expected, actual);
    }

    @Test
    @Ignore("Remove to run test")
    public void testIsPythagoreanOK() {
        PythagoreanTriplet sut = new PythagoreanTriplet(3, 4, 5);
        assertTrue(sut.isPythagorean());
    }

    @Test
    @Ignore("Remove to run test")
    public void testIsPythagoreanFail() {
        PythagoreanTriplet sut = new PythagoreanTriplet(5, 6, 7);
        assertFalse(sut.isPythagorean());
    }

    @Test
    @Ignore("Remove to run test")
    public void shouldMakeTripletsUpToTen() {
        final List<Long> actual
                = PythagoreanTriplet
                        .makeTripletsList()
                        .withFactorsLessThanOrEqualTo(10)
                        .build()
                        .stream()
                        .map(t -> t.calculateProduct())
                        .sorted()
                        .collect(Collectors.toList());
        final List<Long> expected = Arrays.asList(60l, 480l);
        assertEquals(expected, actual);
    }

    @Test
    @Ignore("Remove to run test")
    public void shouldMakeTripletsElevenToTwenty() {
        final List<Long> actual
                = PythagoreanTriplet
                        .makeTripletsList()
                        .withFactorsGreaterThanOrEqualTo(11)
                        .withFactorsLessThanOrEqualTo(20)
                        .build()
                        .stream()
                        .map(t -> t.calculateProduct())
                        .sorted((p1, p2) -> Double.compare(p1, p2))
                        .collect(Collectors.toList());
        final List<Long> expected = Arrays.asList(3840l);
        assertEquals(expected, actual);
    }

    @Test
    @Ignore("Remove to run test")
    public void shouldMakeTripletsAndFilterOnSum() {
        final List<Long> actual
                = PythagoreanTriplet
                        .makeTripletsList()
                        .withFactorsLessThanOrEqualTo(100)
                        .thatSumTo(180)
                        .build()
                        .stream()
                        .map(t -> t.calculateProduct())
                        .sorted((p1, p2) -> Double.compare(p1, p2))
                        .collect(Collectors.toList());
        final List<Long> expected = Arrays.asList(118080l, 168480l, 202500l);
        assertEquals(expected, actual);
    }
}

@@ -414,34 +414,38 @@
 hagoreanTriplet 
-su
+triple
 t = new Pythagor
@@ -517,34 +517,38 @@
 al int actual = 
-su
+triple
 t.calculateSum()
@@ -702,34 +702,38 @@
 hagoreanTriplet 
-su
+triple
 t = new Pythagor
@@ -816,18 +816,22 @@
 ctual = 
-su
+triple
 t.calcul
@@ -994,34 +994,38 @@
 hagoreanTriplet 
-su
+triple
 t = new Pythagor
@@ -1064,18 +1064,22 @@
 ertTrue(
-su
+triple
 t.isPyth
@@ -1210,18 +1210,22 @@
 Triplet 
-su
+triple
 t = new 
@@ -1277,10 +1277,14 @@
 lse(
-su
+triple
 t.is

rename variable