@Before
public void setupImage() {
when(image.getId()).thenReturn("image-id");
+ when(image.getInternalId()).thenReturn("internal-image-id");
when(image.getKey()).thenReturn("image-key");
when(image.isInserted()).thenReturn(true);
when(image.getWidth()).thenReturn(640);
String result = String.valueOf(imageLinkFilter.format(templateContext, image, ImmutableMap.<String, Object>of()));
Element imageElement = getSingleElement(result);
assertThat(imageElement.attr("class"), is(""));
- assertThat(imageElement.attr("src"), is("getImage.html?image=image-id"));
+ assertThat(imageElement.attr("src"), is("getImage.html?image=internal-image-id"));
assertThat(imageElement.attr("title"), is("image title"));
assertThat(imageElement.attr("alt"), is("image description"));
assertThat(imageElement.attr("width"), is("640"));