Checking three values are consecutive This question was recently asked: Determining if three numbers are consecutive

It intrigued me, even though it was broken. I have the following implementation I thought would be interesting, and I am looking for reviews on readability, usability, and for any edge cases it may miss, etc.

/**
 * Determine whether three &lt;code&gt;int&lt;/code&gt; values can be arranged in to an incrementing sequence.
 * 
 * @param a the first value
 * @param b the second value
 * @param c the third value
 * @return true if there is an order of the three inputs which makes them sequential
 */
public static final boolean isSequential(int a, int b, int c) {
    final int x = Math.abs(a - b);
    final int y = Math.abs(b - c);
    final int z = Math.abs(a - c);
    return x + y + z == 4 &amp;&amp; x * y * z == 2;
}


I put this together in a unit test. Here's the full file:

import org.junit.Assert;
import org.junit.Test;

public class ThreeInARow {

    /**
     * Determine whether three &lt;code&gt;int&lt;/code&gt; values can be arranged in to an incrementing sequence.
     * 
     * @param a the first value
     * @param b the second value
     * @param c the third value
     * @return true if there is an order of the three inputs which makes them sequential
     */
    public static final boolean isSequential(int a, int b, int c) {
        final int x = Math.abs(a - b);
        final int y = Math.abs(b - c);
        final int z = Math.abs(a - c);
        return x + y + z == 4 &amp;&amp; x * y * z == 2;
    }

    private static final int[] FROM = {Integer.MIN_VALUE, Integer.MIN_VALUE + 3, -5, -4, -3, -2, -1, 
            0, 1, 2, 3, 100, Integer.MAX_VALUE - 2, Integer.MAX_VALUE};


    @Test
    public void testGoodBlocks() {

        for (int f : FROM) {
            int a = f;
            int b = a + 1;
            int c = b + 1;
            Assert.assertTrue(isSequential(a, b, c));
            Assert.assertTrue(isSequential(b, c, a));
            Assert.assertTrue(isSequential(c, a, b));
            Assert.assertTrue(isSequential(b, a, c));
            Assert.assertTrue(isSequential(a, c, b));
            Assert.assertTrue(isSequential(c, b, a));
        }

    }

    @Test
    public void testBadBlocks() {

        for (int f : FROM) {
            int a = f;
            int b = a + 1;
            int c = b + 2;
            Assert.assertFalse(isSequential(a, b, c));
            Assert.assertFalse(isSequential(b, c, a));
            Assert.assertFalse(isSequential(c, a, b));
            Assert.assertFalse(isSequential(b, a, c));
            Assert.assertFalse(isSequential(a, c, b));
            Assert.assertFalse(isSequential(c, b, a));
        }

    }

    @Test
    public void testSpecials() {
        int[][] specials = {
                {0,0,0},
                {1,0,1},
                {0,0,1}
        };
        for (int[] attempt : specials) {
            Assert.assertFalse(isSequential(attempt[0], attempt[1], attempt[2]));
        }
    }

}
I don't like the idea of having to solve Diophantine equations just to be able to understand the code.  I'll suggest the same solution here as I did for @cody.codes:

public static boolean isSequential(int a, int b, int c) {
    int min = Math.min(a, Math.min(b, c));
    int max = Math.max(a, Math.max(b, c));
    return max - min == 2 &amp;&amp; a != b &amp;&amp; a != c &amp;&amp; b != c;
}


"The minimum and maximum differ by 2, and all three numbers are unique" is easier to understand.