class EqualQa implements Qa<Boolean, Boolean> {

    @Override
    public TransientOperation<Boolean, Boolean> evaluate(final BufferedImage left, final BufferedImage right) {
        // Check size
        CheckEqualSizePreprocessor equalSize = new CheckEqualSizePreprocessor(left, right);
        equalSize.process();
        equalSize = null;

        ConvenientBufferedImageWrapper leftWrapped = new ConvenientBufferedImageWrapper(left);
        ConvenientBufferedImageWrapper rightWrapped = new ConvenientBufferedImageWrapper(right);
        AutoColorConverter convLeft = new AutoColorConverter(leftWrapped, rightWrapped,
                                                             AutoColorConverter.AlternativeColorConverter.CIEXYZ);
        AutoColorConverter convRight = new AutoColorConverter(rightWrapped, leftWrapped,
                                                              AutoColorConverter.AlternativeColorConverter.CIEXYZ);

        // Evaluate
        EqualMetric metric = new EqualMetric(convLeft, convRight, new Point(0, 0),
                                             new Point(left.getWidth(), left.getHeight()));

        // Evaluate
        return metric.execute();
    }

}

class EqualQaTest  {

    @Test
    public void evaluateTest_half000000_111111_half000000_111111() {

        BufferedImage left = BufferedImageHelper.createSolidHalfImage(new Color(0, 0, 0), new Color(255, 255, 255));
        BufferedImage right = BufferedImageHelper.createSolidHalfImage(new Color(0, 0, 0), new Color(255, 255, 255));

        EqualQa equalQa = new EqualQa();
        TransientOperation<Boolean, Boolean> op = equalQa.evaluate(left, right);
        Assert.assertEquals(true, op.getAggregatedResult());
        Assert.assertEquals(true, op.getResult());
    }

}