CurveLookupMap { public static String getCurveOid(EcCurve curve) { return CURVE_TO_OID_MAP.get(curve); }  static EcCurve getCurveByName(String name); static EcCurve getCurveByOid(String oid); static String getCurveName(EcCurve curve); static String getCurveOid(EcCurve curve);  }
@Test public void testGetSecp256r1Oid() { Assert.assertEquals("1.2.840.10045.3.1.7", CurveLookupMap.getCurveOid(EcCurve.secp256r1)); }
@Test public void testGetSecp384r1Oid() { Assert.assertEquals("1.3.132.0.34", CurveLookupMap.getCurveOid(EcCurve.secp384r1)); }
@Test public void testGetSecp512r1Oid() { Assert.assertEquals("1.3.132.0.35", CurveLookupMap.getCurveOid(EcCurve.secp521r1)); }
@Test public void testNotFoundOid() { EcCurve madeUpCurve = new EcCurveImpl(BigInteger.ONE, BigInteger.ONE, PointHasher.THREE, BigInteger.ONE, BigInteger.ONE,BigInteger.ONE); Assert.assertNull(CurveLookupMap.getCurveOid(madeUpCurve)); }