import org.junit.Test;
import org.junit.Ignore;

import java.util.Arrays;
import java.util.List;
import java.util.Collections;

import static org.junit.Assert.assertEquals;

public class AllergiesTest {


    @Test
    public void noAllergiesMeansNotAllergicToAnything() {
        Allergies allergies = new Allergies(0);

        assertEquals(false, allergies.isAllergicTo(Allergen.PEANUTS));
        assertEquals(false, allergies.isAllergicTo(Allergen.CATS));
        assertEquals(false, allergies.isAllergicTo(Allergen.STRAWBERRIES));
    }

    @Ignore("Remove to run test")
    @Test
    public void allergicToEggs() {
        Allergies allergies = new Allergies(1);

        assertEquals(true, allergies.isAllergicTo(Allergen.EGGS));
    }

    @Ignore("Remove to run test")
    @Test
    public void allergicToEggsInAdditionToOtherStuff() {
        Allergies allergies = new Allergies(5);

        assertEquals(true, allergies.isAllergicTo(Allergen.EGGS));
        assertEquals(true, allergies.isAllergicTo(Allergen.SHELLFISH));
        assertEquals(false, allergies.isAllergicTo(Allergen.STRAWBERRIES));
    }

    @Ignore("Remove to run test")
    @Test
    public void noAllergies() {
        Allergies allergies = new Allergies(0);

        assertEquals(0, allergies.getList().size());
    }

    @Ignore("Remove to run test")
    @Test
    public void isAllergicToJustEggs() {
        Allergies allergies = new Allergies(1);
        List<Allergen> expectedAllergens = Collections.singletonList(Allergen.EGGS);

        assertEquals(expectedAllergens, allergies.getList());
    }

    @Ignore("Remove to run test")
    @Test
    public void isAllergicToJustPeanuts() {
        Allergies allergies = new Allergies(2);
        List<Allergen> expectedAllergens = Collections.singletonList(Allergen.PEANUTS);

        assertEquals(expectedAllergens, allergies.getList());
    }

    @Ignore("Remove to run test")
    @Test
    public void isAllergicToJustStrawberries() {
        Allergies allergies = new Allergies(8);
        List<Allergen> expectedAllergens = Collections.singletonList(Allergen.STRAWBERRIES);

        assertEquals(expectedAllergens, allergies.getList());
    }

    @Ignore("Remove to run test")
    @Test
    public void isAllergicToEggsAndPeanuts() {
        Allergies allergies = new Allergies(3);
        List<Allergen> expectedAllergens = Arrays.asList(
                Allergen.EGGS,
                Allergen.PEANUTS
        );

        assertEquals(expectedAllergens, allergies.getList());
    }

    @Ignore("Remove to run test")
    @Test
    public void isAllergicToEggsAndShellfish() {
        Allergies allergies = new Allergies(5);
        List<Allergen> expectedAllergens = Arrays.asList(
                Allergen.EGGS,
                Allergen.SHELLFISH
        );

        assertEquals(expectedAllergens, allergies.getList());
    }

    @Ignore("Remove to run test")
    @Test
    public void isAllergicToLotsOfStuff() {
        Allergies allergies = new Allergies(248);
        List<Allergen> expectedAllergens = Arrays.asList(
                Allergen.STRAWBERRIES,
                Allergen.TOMATOES,
                Allergen.CHOCOLATE,
                Allergen.POLLEN,
                Allergen.CATS
        );

        assertEquals(expectedAllergens, allergies.getList());
    }

    @Ignore("Remove to run test")
    @Test
    public void isAllergicToEverything() {
        Allergies allergies = new Allergies(255);
        List<Allergen> expectedAllergens = Arrays.asList(
                Allergen.EGGS,
                Allergen.PEANUTS,
                Allergen.SHELLFISH,
                Allergen.STRAWBERRIES,
                Allergen.TOMATOES,
                Allergen.CHOCOLATE,
                Allergen.POLLEN,
                Allergen.CATS
        );

        assertEquals(expectedAllergens, allergies.getList());
    }

    @Ignore("Remove to run test")
    @Test
    public void ignoreNonAllergenScoreParts() {
        Allergies allergies = new Allergies(509);
        List<Allergen> expectedAllergens = Arrays.asList(
                Allergen.EGGS,
                Allergen.SHELLFISH,
                Allergen.STRAWBERRIES,
                Allergen.TOMATOES,
                Allergen.CHOCOLATE,
                Allergen.POLLEN,
                Allergen.CATS
        );

        assertEquals(expectedAllergens, allergies.getList());
    }
}

@@ -165,16 +165,103 @@
 tEquals;
+%0Aimport static org.junit.Assert.assertTrue;%0Aimport static org.junit.Assert.assertFalse;
 %0A%0Apublic
@@ -412,38 +412,30 @@
       assert
-Equals(f
+F
 alse
-, 
+(
 allergies.is
@@ -475,38 +475,30 @@
       assert
-Equals(f
+F
 alse
-, 
+(
 allergies.is
@@ -535,38 +535,30 @@
       assert
-Equals(f
+F
 alse
-, 
+(
 allergies.is
@@ -738,37 +738,29 @@
       assert
-Equals(true, 
+True(
 allergies.is
@@ -954,37 +954,29 @@
       assert
-Equals(true, 
+True(
 allergies.is
@@ -1021,21 +1021,13 @@
 sert
-Equals(true, 
+True(
 alle
@@ -1085,22 +1085,14 @@
 sert
-Equals(f
+F
 alse
-, 
+(
 alle

replace assertEquals with assertTrue/False as appropriate