### Question:
ExtKeyUsage extends KeyUsage { public static KeyUsage valueOfByCode(String code) { KeyUsage ku = MAP.get(code); if (ku != null) return ku; return TR31MAP.get(code); } protected  ExtKeyUsage(String code, String name); static KeyUsage valueOfByCode(String code); static Map<String, KeyUsage> entries(); final static KeyUsage DEK; final static KeyUsage ZEK; final static KeyUsage TEK; final static KeyUsage RSAPK; final static KeyUsage RSASK; final static KeyUsage RSASKICC; final static KeyUsage RSASKPIN; final static KeyUsage RSASKTLS; final static KeyUsage TMK; final static KeyUsage ZMK; final static KeyUsage HMACSHA1; final static KeyUsage HMACSHA224; final static KeyUsage HMACSHA256; final static KeyUsage HMACSHA384; final static KeyUsage HMACSHA512; final static KeyUsage TPK; final static KeyUsage ZPK; }### Answer:
@Test public void testValueOfByCodeTEK() { KeyUsage ret = ExtKeyUsage.valueOfByCode("32"); assertEquals("32", ret.getCode()); assertEquals("Terminal Encryption Key", ret.getName()); assertSame(ExtKeyUsage.TEK, ret); }
@Test public void testValueOfByCodeZPK() { KeyUsage ret = ExtKeyUsage.valueOfByCode("27"); assertEquals("27", ret.getCode()); assertEquals("Zone PIN Encryption Key", ret.getName()); assertSame(ExtKeyUsage.ZPK, ret); }
@Test public void testValueOfByCodeKEK() { KeyUsage ret = ExtKeyUsage.valueOfByCode("K0"); assertEquals("K0", ret.getCode()); assertSame(KeyUsage.KEK, ret); }