Test alias name for HmacSHA224/HmacSHA256

(cherry picked from commit 6c6767d7b1dfeb09cb7fcf090274dac9c8978f3d)

Bug: 31114355
Change-Id: Ia2ffa15b626dd057f34a5c51f4fbc67876813f6d
Test: make -j 32, vogar MacTest
diff --git a/luni/src/test/java/libcore/javax/crypto/MacTest.java b/luni/src/test/java/libcore/javax/crypto/MacTest.java
index 314a564..b308f02 100644
--- a/luni/src/test/java/libcore/javax/crypto/MacTest.java
+++ b/luni/src/test/java/libcore/javax/crypto/MacTest.java
@@ -59,4 +59,14 @@
             Security.removeProvider(mockProvider.getName());
         }
     }
+
+    /**
+     * Aliases used to be wrong due to a typo.
+     * http://b/31114355
+     */
+    public void testMac_correctAlias() throws Exception {
+        Provider androidOpenSSLProvider = Security.getProvider("AndroidOpenSSL");
+        assertEquals("HmacSHA224", androidOpenSSLProvider.get("Alg.Alias.Mac.1.2.840.113549.2.8"));
+        assertEquals("HmacSHA256", androidOpenSSLProvider.get("Alg.Alias.Mac.1.2.840.113549.2.9"));
+    }
 }