private void checkImage(final String imagePath, int expectedWidth, int expectedHeight)
      throws IOException {
    Pair<Integer, Integer> size = WebpUtil.getSize(getResourceStream(imagePath));
    assertNotNull("Something went wrong during parsing WebP! " + imagePath, size);
    assertEquals(expectedWidth, size.component1().intValue());
    assertEquals(expectedHeight, size.component2().intValue());
  }
Contains the logic in order to test the size of an image

@param imagePath The Path of the given image
@param expectedWidth The expected width
@param expectedHeight The expected height
@throws IOException In case of errors
imagepipeline-base/src/test/java/com/facebook/imageutils/WebPUtilTest.java