ImagePair { public double getEntireSimilarity() { return entireSimilarity; } ImagePair(BufferedImage expectedImage, BufferedImage actualImage); void compareImagePairAll(); void prepare(); void doCategorize(); List<ComparedRectangleArea> getComparedRectangles(); double getEntireSimilarity(); double getMinSimilarity(); Offset getDominantOffset(); boolean isExpectedMoved();  }
@Test public void testGetEntireSimilarity() throws Exception { BufferedImage expectedImage = ImageIO.read(getClass().getResource("ImagePairTest_missing_expected.png")); BufferedImage targetImage = ImageIO.read(getClass().getResource("ImagePairTest_missing_actual.png")); ImagePair imagePair = new ImagePair(expectedImage, targetImage); imagePair.compareImagePairAll(); double expected = 0.75940975; double actual = imagePair.getEntireSimilarity(); assertThat(actual, is(expected)); }