CurveLookupMap { public static String getCurveName(EcCurve curve) { return CURVE_TO_NAME_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 testGetSecp256r1Name() { Assert.assertEquals("secp256r1", CurveLookupMap.getCurveName(EcCurve.secp256r1)); }
@Test public void testGetSecp384r1Name() { Assert.assertEquals("secp384r1", CurveLookupMap.getCurveName(EcCurve.secp384r1)); }
@Test public void testGetSecp521r1Name() { Assert.assertEquals("secp521r1", CurveLookupMap.getCurveName(EcCurve.secp521r1)); }
@Test public void testNotFoundName() { EcCurve madeUpCurve = new EcCurveImpl(BigInteger.ONE, BigInteger.ONE, PointHasher.THREE, BigInteger.ONE, BigInteger.ONE,BigInteger.ONE); Assert.assertNull(CurveLookupMap.getCurveName(madeUpCurve)); }