@Test public void shouldGetOnePromotionTest() throws Exception { List<String> list = asList("ITEM0001:75"); Map<String, DiscountPromotion> result = discountParser.parser(list); assertThat(result.size(), is(1)); assertThat(result.containsKey("ITEM0001"), is(true)); }
@Test(expected = Exception.class) public void shouldThrowExceptionTest() throws Exception { List<String> list = asList("ITEm0901"); discountParser.parser(list); }