@Test
	public void testCubeRoot() {
		final ECFieldElement val = new ECFieldElement(new BigInteger(
				FIELD_SIZE, SECURE_RANDOM).mod(P));
		final ECFieldElement val3 = val.square().multiply(val);

		// cubeRoot may not be equals to val because we got one of the three
		// solutions!
		final ECFieldElement[] roots = val3.cubeRoot();
		if (roots.length != 3) {
			Assert.fail();
			return;
		}
		Assert.assertTrue(val.equals(roots[0]) || val.equals(roots[1])
				|| val.equals(roots[2]));
	}