@Test public void testThatVerificationFailsIfTheProductDoesNotIntersectTheTargetArea() { PowerMockito.when(Utils.createProductArea(any(Product.class))).thenReturn(_nonIntersectingArea); boolean result = _productValidator.isValid(M_product); assertEquals(false, result); verify(S_logger, times(1)).info("Product skipped. The product 'ProductMock' does not intersect the target product."); }
public boolean isValid(Product product) { return product != null && containsGeoCodingWithReverseOperationSupport(product) && fulfillsTimeConditions(product) && canHandleExpressionOrSourceBand(product) && isInDateRange(product) && intersectsTargetArea(product); }
ProductValidator { public boolean isValid(Product product) { return product != null && containsGeoCodingWithReverseOperationSupport(product) && fulfillsTimeConditions(product) && canHandleExpressionOrSourceBand(product) && isInDateRange(product) && intersectsTargetArea(product); } }
ProductValidator { public boolean isValid(Product product) { return product != null && containsGeoCodingWithReverseOperationSupport(product) && fulfillsTimeConditions(product) && canHandleExpressionOrSourceBand(product) && isInDateRange(product) && intersectsTargetArea(product); } ProductValidator(String sourceBandName, String bandMathExpression, String validPixelExpression, ProductData.UTC startDate, ProductData.UTC endDate, Area targetArea, Logger logger); }
ProductValidator { public boolean isValid(Product product) { return product != null && containsGeoCodingWithReverseOperationSupport(product) && fulfillsTimeConditions(product) && canHandleExpressionOrSourceBand(product) && isInDateRange(product) && intersectsTargetArea(product); } ProductValidator(String sourceBandName, String bandMathExpression, String validPixelExpression, ProductData.UTC startDate, ProductData.UTC endDate, Area targetArea, Logger logger); boolean isValid(Product product); }
ProductValidator { public boolean isValid(Product product) { return product != null && containsGeoCodingWithReverseOperationSupport(product) && fulfillsTimeConditions(product) && canHandleExpressionOrSourceBand(product) && isInDateRange(product) && intersectsTargetArea(product); } ProductValidator(String sourceBandName, String bandMathExpression, String validPixelExpression, ProductData.UTC startDate, ProductData.UTC endDate, Area targetArea, Logger logger); boolean isValid(Product product);  }