@Test
public void testPointEncode() throws Exception {

  for (TestVector2 test : testVectors2) {
    EllipticCurve curve = EllipticCurves.getCurveSpec(test.curve).getCurve();
    ECPoint p = new ECPoint(test.x, test.y);
    byte[] encoded = EllipticCurves.pointEncode(curve, test.format, p);
    assertEquals(TestUtil.hexEncode(encoded), TestUtil.hexEncode(test.encoded));
  }
}