@Test public void testAcceptProductPredicateNull() { System.clearProperty(SYSPROP_ECLIPSE_PRODUCT); when(configuration.getAcceptedProductsPatterns()) .thenReturn(newArrayList(Pattern.compile(quote("other.product.id")))); sut = new AcceptProductPredicate(configuration); assertFalse(sut.apply(status)); }
@Test public void testAcceptProductPredicateTrue() { System.setProperty(SYSPROP_ECLIPSE_PRODUCT, "the.eclipse.product.id"); when(configuration.getAcceptedProductsPatterns()) .thenReturn(newArrayList(Pattern.compile(quote("the.eclipse.product.id")))); sut = new AcceptProductPredicate(configuration); assertTrue(sut.apply(status)); }