import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

import static java.util.Arrays.asList;
import static java.util.Collections.emptyList;
import static java.util.Collections.singletonList;
import static org.junit.Assert.assertEquals;

public class ChangeCalculatorTest {

    @Rule
    public ExpectedException expectedException = ExpectedException.none();

    @Test
    public void testChangeThatCanBeGivenInASingleCoin() {
        ChangeCalculator changeCalculator = new ChangeCalculator(asList(1, 5, 10, 25, 100));

        assertEquals(
                singletonList(25),
                changeCalculator.computeMostEfficientChange(25));
    }

    @Ignore("Remove to run test")
    @Test
    public void testChangeThatMustBeGivenInMultipleCoins() {
        ChangeCalculator changeCalculator = new ChangeCalculator(asList(1, 5, 10, 25, 100));

        assertEquals(
                asList(5, 10),
                changeCalculator.computeMostEfficientChange(15));
    }

    @Ignore("Remove to run test")
    @Test
    // https://en.wikipedia.org/wiki/Change-making_problem#Greedy_method
    public void testLilliputianCurrencyForWhichGreedyAlgorithmFails() {
        ChangeCalculator changeCalculator = new ChangeCalculator(asList(1, 4, 15, 20, 50));

        assertEquals(
                asList(4, 4, 15),
                changeCalculator.computeMostEfficientChange(23));
    }

    @Ignore("Remove to run test")
    @Test
    // https://en.wikipedia.org/wiki/Change-making_problem#Greedy_method
    public void testLowerElbonianCurrencyForWhichGreedyAlgorithmFails() {
        ChangeCalculator changeCalculator = new ChangeCalculator(asList(1, 5, 10, 21, 25));

        assertEquals(
                asList(21, 21, 21),
                changeCalculator.computeMostEfficientChange(63));
    }

    @Ignore("Remove to run test")
    @Test
    public void testLargeAmountOfChange() {
        ChangeCalculator changeCalculator = new ChangeCalculator(asList(1, 2, 5, 10, 20, 50, 100));

        assertEquals(
                asList(2, 2, 5, 20, 20, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100),
                changeCalculator.computeMostEfficientChange(999));
    }

    @Ignore("Remove to run test")
    @Test
    public void testZeroChange() {
        ChangeCalculator changeCalculator = new ChangeCalculator(asList(1, 5, 10, 21, 25));

        assertEquals(
                emptyList(),
                changeCalculator.computeMostEfficientChange(0));
    }

    @Ignore("Remove to run test")
    @Test
    public void testChangeLessThanSmallestCoinInCurrencyCannotBeRepresented() {
        ChangeCalculator changeCalculator = new ChangeCalculator(asList(5, 10));

        expectedException.expect(IllegalArgumentException.class);
        expectedException.expectMessage("The total 3 cannot be represented in the given currency.");

        changeCalculator.computeMostEfficientChange(3);
    }

    @Ignore("Remove to run test")
    @Test
    public void testChangeLargerThanAllCoinsInCurrencyThatCannotBeRepresented() {
        ChangeCalculator changeCalculator = new ChangeCalculator(asList(5, 10));

        expectedException.expect(IllegalArgumentException.class);
        expectedException.expectMessage("The total 94 cannot be represented in the given currency.");

        changeCalculator.computeMostEfficientChange(94);
    }

    @Ignore("Remove to run test")
    @Test
    public void testNegativeChangeIsRejected() {
        ChangeCalculator changeCalculator = new ChangeCalculator(asList(1, 2, 5));

        expectedException.expect(IllegalArgumentException.class);
        expectedException.expectMessage("Negative totals are not allowed.");

        changeCalculator.computeMostEfficientChange(-5);
    }

}

@@ -290,16 +290,41 @@
 quals;%0A%0A
+/*%0A * version: 1.1.0%0A */%0A
 public c
@@ -1215,36 +1215,8 @@
 ency
-ForWhichGreedyAlgorithmFails
 () %7B
@@ -1600,36 +1600,8 @@
 ency
-ForWhichGreedyAlgorithmFails
 () %7B
@@ -2122,24 +2122,24 @@
  100, 100),%0A
-
             
@@ -2192,32 +2192,845 @@
 e(999));%0A    %7D%0A%0A
+    @Ignore(%22Remove to run test%22)%0A    @Test%0A    // https://en.wikipedia.org/wiki/Change-making_problem#Greedy_method%0A    public void testPossibleChangeWithoutUnitCoinAvailable() %7B%0A        ChangeCalculator changeCalculator = new ChangeCalculator(asList(2, 5, 10, 20, 50));%0A%0A        assertEquals(%0A                asList(2, 2, 2, 5, 10),%0A                changeCalculator.computeMostEfficientChange(21));%0A    %7D%0A%0A    @Ignore(%22Remove to run test%22)%0A    @Test%0A    // https://en.wikipedia.org/wiki/Change-making_problem#Greedy_method%0A    public void testAnotherPossibleChangeWithoutUnitCoinAvailable() %7B%0A        ChangeCalculator changeCalculator = new ChangeCalculator(asList(4, 5));%0A%0A        assertEquals(%0A                asList(4, 4, 4, 5, 5, 5),%0A                changeCalculator.computeMostEfficientChange(27));%0A    %7D%0A%0A
     @Ignore(%22Rem

update to v1.1.0 tests