ProductUtils { public static boolean isPerServingInLiter(Product product) { return StringUtils.containsIgnoreCase(product.getServingSize(), Units.UNIT_LITER); } private  ProductUtils(); static boolean isPerServingInLiter(Product product); static boolean isBarcodeValid(@Nullable String barcode); static Single<ProductState> toState(@NonNull OfflineSavedProduct offlineSavedProduct, @NonNull Context context); static Single<Product> toOnlineProduct(@NonNull OfflineSavedProduct offlineSavedProduct, @NonNull Context context);  }
@Test public void isPerServingInLiter() { Product mockProd = mock(Product.class); when(mockProd.getServingSize()).thenReturn("3l"); assertThat(ProductUtils.isPerServingInLiter(mockProd)).isTrue(); when(mockProd.getServingSize()).thenReturn("3oz"); assertThat(ProductUtils.isPerServingInLiter(mockProd)).isFalse(); }