Merge "Add JapaneseUtilsTest"
diff --git a/OWNERS b/OWNERS
index 22dad71..0b3cfb7 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,4 +1,4 @@
 # Default code reviewers picked from top 3 or more developers.
 # Please update this list if you find better candidates.
 pirozzoj@google.com
-maghraby@google.com
+johnshao@google.com
diff --git a/java/com/android/vcard/VCardParserImpl_V21.java b/java/com/android/vcard/VCardParserImpl_V21.java
index 2fa52df..07695a5 100644
--- a/java/com/android/vcard/VCardParserImpl_V21.java
+++ b/java/com/android/vcard/VCardParserImpl_V21.java
@@ -481,7 +481,7 @@
                 || ptypeval.startsWith("X-"))
                 && !mUnknownTypeSet.contains(ptypeval)) {
             mUnknownTypeSet.add(ptypeval);
-            Log.w(LOG_TAG, String.format("TYPE unsupported by %s: ", getVersion(), ptypeval));
+            Log.w(LOG_TAG, String.format("TYPE unsupported by %s: %s", getVersion(), ptypeval));
         }
         propertyData.addParameter(VCardConstants.PARAM_TYPE, ptypeval);
     }
@@ -495,7 +495,7 @@
                 || mUnknownValueSet.contains(pvalueval))) {
             mUnknownValueSet.add(pvalueval);
             Log.w(LOG_TAG, String.format(
-                    "The value unsupported by TYPE of %s: ", getVersion(), pvalueval));
+                    "The value unsupported by TYPE of %s: %s", getVersion(), pvalueval));
         }
         propertyData.addParameter(VCardConstants.PARAM_VALUE, pvalueval);
     }
diff --git a/tests/Android.bp b/tests/Android.bp
index 5c49410..ec1d932 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -31,6 +31,10 @@
     static_libs: [
         "com.android.vcard",
         "junit",
+        "androidx.test.ext.truth",
+        "androidx.test.rules",
+        "mockito-target",
+        "truth-prebuilt",
     ],
 
     jacoco: {
diff --git a/tests/src/com/android/vcard/tests/VCardExceptionTest.java b/tests/src/com/android/vcard/tests/VCardExceptionTest.java
new file mode 100644
index 0000000..6f09fad
--- /dev/null
+++ b/tests/src/com/android/vcard/tests/VCardExceptionTest.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.vcard.tests;
+
+import com.android.vcard.exception.VCardException;
+
+import junit.framework.TestCase;
+
+public class VCardExceptionTest extends TestCase {
+    static final String TEST_MESSAGE = "message";
+
+    public void testExceptionWithoutMessage() {
+        VCardException exception = new VCardException();
+        assertNull(exception.getMessage());
+    }
+
+    public void testExceptionWithMessage() {
+        VCardException exception = new VCardException(TEST_MESSAGE);
+        assertEquals(exception.getMessage(), TEST_MESSAGE);
+    }
+}