ImageKeyHelper { public static String getImageStringKey(ProductImageField field, Product product) { return getImageStringKey(field, product.getLang()); } private  ImageKeyHelper(); static String getImageStringKey(ProductImageField field, Product product); static String getImageStringKey(ProductImageField field, String language); static String getLanguageCodeFromUrl(ProductImageField field, String url); static Bundle createImageBundle(ProductImageField imageType, Product product, String language, String imageUrl); static int getResourceIdForEditAction(ProductImageField field); static int getResourceId(ProductImageField field); static String getImageUrl(String barcode, String imageName, String size); static final String IMAGE_URL; static final String IMAGE_FILE; static final String IMAGE_TYPE; static final String PRODUCT_BARCODE; static final String PRODUCT; static final String LANGUAGE; static final String IMAGE_STRING_ID; static final String IMG_ID; static final String IMAGE_EDIT_SIZE_FILE; }
@Test public void getImageStringKey_returnsCorrectString() { Mockito.when(mockProduct.getLang()).thenReturn("de"); assertThat(ImageKeyHelper.getImageStringKey(ProductImageField.FRONT, mockProduct)).isEqualTo("front_de"); }