diff --git a/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java b/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java
index 7dc7131..e867873 100644
--- a/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java
+++ b/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java
@@ -1047,7 +1047,8 @@
 			defl.reset();
 			fail("defl.reset() can still be used after " + desc
 					+ " is called in test_" + desc);
-		} catch (NullPointerException e) {
+		} catch (NullPointerException expected) {
+		} catch (IllegalStateException expected) {
 		}
 
         // Methods where we expect NullPointerException to be thrown
@@ -1055,7 +1056,8 @@
             defl.getBytesRead();
             fail("defl.reset() can still be used after " + desc
                     + " is called in test_" + desc);
-        } catch (NullPointerException e) {
+	} catch (NullPointerException expected) {
+	} catch (IllegalStateException expected) {
         }
         
         // Methods where we expect NullPointerException to be thrown
@@ -1063,7 +1065,8 @@
             defl.getBytesWritten();
             fail("defl.getBytesWritten() can still be used after " + desc
                     + " is called in test_" + desc);
-        } catch (NullPointerException e) {
+	} catch (NullPointerException expected) {
+	} catch (IllegalStateException expected) {
         }        
         
 		// Methods that should be allowed to be called after end() is called
diff --git a/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java b/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
index e80b41b..6d54d30 100644
--- a/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
+++ b/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
@@ -1097,21 +1097,23 @@
         try{
             inflate.getAdler();
             fail("IllegalStateException expected");
-        }catch(IllegalStateException ise){
+        }catch(IllegalStateException expected){
             //expected
         }
 
         try{
             inflate.getBytesRead();
             fail("NullPointerException expected");
-        }catch(NullPointerException ise){
+        }catch(IllegalStateException expected){
+        }catch(NullPointerException expected){
             //expected
         }
         
         try{
             inflate.getBytesWritten();
             fail("NullPointerException expected");
-        }catch(NullPointerException ise){
+        }catch(NullPointerException expected){
+        }catch(IllegalStateException expected){
             //expected
         }
          
diff --git a/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java b/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java
index 31c6766..fd96ea4 100644
--- a/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java
+++ b/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java
@@ -226,9 +226,19 @@
         // Regression for HARMONY-4405
         try {
             zip.write(null, 0, -2);
-            fail("Should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
+        }
+        try {
+            zip.write(null, 0, 2);
+            fail();
+        } catch (NullPointerException expected) {
+        }
+        try {
+            zip.write(new byte[2], 0, -2);
+            fail();
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         // Close stream because ZIP is invalid
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java
index 4b58058..8a27c92 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java
@@ -329,22 +329,22 @@
         try {
             bos.write(byteArray, -1, -1);
             fail();
-        } catch (IndexOutOfBoundsException e) {
-            // expected IndexOutOfBoundsException
+        } catch (IOException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
             bos.write(null, -1, -1);
-            fail("should throw NullPointerException");
-        } catch (NullPointerException e) {
-            // expected NullPointerException.
+            fail();
+        } catch (IOException expected) {
+        } catch (NullPointerException expected) {
         }
 
         try {
             bos.write(null, 0, 1);
-            fail("should throw NullPointerException");
-        } catch (NullPointerException e) {
-            // expected NullPointerException.
+            fail();
+        } catch (IOException expected) {
+        } catch (NullPointerException expected) {
         }
     }
 
@@ -823,11 +823,12 @@
 
     // Regression test for flush on closed stream
     public void test_flush_on_closed_stream() throws IOException {
-        BufferedOutputStream bos =
-            new BufferedOutputStream(
-                new ByteArrayOutputStream());
+        BufferedOutputStream bos = new BufferedOutputStream(new ByteArrayOutputStream());
         bos.close();
-        bos.flush(); // RI does not throw exception
+        try {
+            bos.flush(); // RI does not throw exception
+        } catch (IOException expected) { // but Android does
+        }
     }
 
     /**
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedReaderTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedReaderTest.java
index 6f0ef40..f101c73 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedReaderTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedReaderTest.java
@@ -380,16 +380,16 @@
 		
 		try {
 			br.read(nullCharArray, -1, -1);
-			fail("should throw IndexOutOfBoundsException");
-		} catch (IndexOutOfBoundsException e) {
-			// expected
+			fail();
+		} catch (NullPointerException expected) {
+		} catch (IndexOutOfBoundsException expected) {
 		}
 		
 		try {
 			br.read(nullCharArray, -1, 0);
-			fail("should throw IndexOutOfBoundsException");
-		} catch (IndexOutOfBoundsException e) {
-			// expected
+			fail();
+		} catch (NullPointerException expected) {
+		} catch (IndexOutOfBoundsException expected) {
 		}
 
 		try {
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedWriterTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedWriterTest.java
index adc7ebe..c28ddd9 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedWriterTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedWriterTest.java
@@ -161,8 +161,8 @@
         try {
             bWriter.write(nullCharArray, -1, -1);
             fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ByteArrayOutputStreamTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ByteArrayOutputStreamTest.java
index 9a4b415..98c5b1f 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ByteArrayOutputStreamTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ByteArrayOutputStreamTest.java
@@ -189,11 +189,8 @@
         ByteArrayOutputStream obj = new ByteArrayOutputStream();
         try {
             obj.write(new byte[] { (byte) 0x00 }, -1, 0);
-            fail("IndexOutOfBoundsException expected");
-        } catch (IndexOutOfBoundsException t) {
-            assertEquals(
-                    "IndexOutOfBoundsException rather than a subclass expected",
-                    IndexOutOfBoundsException.class, t.getClass());
+            fail();
+        } catch (IndexOutOfBoundsException expected) {
         }
     }
 
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/CharArrayWriterTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/CharArrayWriterTest.java
index 7a065b1..a188add 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/CharArrayWriterTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/CharArrayWriterTest.java
@@ -124,11 +124,8 @@
         CharArrayWriter obj = new CharArrayWriter();
         try {
             obj.write(new char[] { '0' }, 0, -1);
-            fail("IndexOutOfBoundsException expected");
-        } catch (IndexOutOfBoundsException t) {
-            assertEquals(
-                    "IndexOutOfBoundsException rather than a subclass expected",
-                    IndexOutOfBoundsException.class, t.getClass());
+            fail();
+        } catch (IndexOutOfBoundsException expected) {
         }
     }
 
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/DataInputStreamTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/DataInputStreamTest.java
index f737b7e..c9241dc 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/DataInputStreamTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/DataInputStreamTest.java
@@ -214,23 +214,23 @@
 
         try {
             is.readFully(nullByteArray, -1, -1);
-            fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
             is.readFully(nullByteArray, 0, -1);
-            fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
             is.readFully(nullByteArray, 1, -1);
-            fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         is.readFully(nullByteArray, -1, 0);
@@ -239,9 +239,9 @@
 
         try {
             is.readFully(nullByteArray, -1, 1);
-            fail("should throw NullPointerException");
-        } catch (NullPointerException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
@@ -275,23 +275,23 @@
 
         try {
             is.readFully(byteArray, -1, -1);
-            fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
             is.readFully(byteArray, 0, -1);
-            fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
             is.readFully(byteArray, 1, -1);
-            fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         is.readFully(byteArray, -1, 0);
@@ -336,23 +336,23 @@
 
         try {
             is.readFully(nullByteArray, -1, -1);
-            fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
             is.readFully(nullByteArray, 0, -1);
-            fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
             is.readFully(nullByteArray, 1, -1);
-            fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         is.readFully(nullByteArray, -1, 0);
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/InputStreamReaderTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/InputStreamReaderTest.java
index cd5b374..f85befb 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/InputStreamReaderTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/InputStreamReaderTest.java
@@ -471,19 +471,17 @@
      */
     public void test_read$CII_1() throws IOException {
         try {
-            // Throws IndexOutOfBoundsException before NullPointerException
             reader.read(null, -1, 1);
-            fail("Should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
-            // Throws NullPointerException before IndexOutOfBoundsException
             reader.read(null, 0, -1);
             fail("Should throw NullPointerException");
         } catch (NullPointerException e) {
-            // expected
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/OutputStreamWriterTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/OutputStreamWriterTest.java
index 837b443..a788568 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/OutputStreamWriterTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/OutputStreamWriterTest.java
@@ -114,17 +114,17 @@
         // Throws IndexOutOfBoundsException if offset is negative
         try {
             writer.write((char[]) null, -1, -1);
-            fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // Expected
+            fail();
+        } catch (NullPointerException exception) {
+        } catch (IndexOutOfBoundsException exception) {
         }
 
         // throws NullPointerException though count is negative
         try {
             writer.write((char[]) null, 1, -1);
-            fail("should throw NullPointerException");
-        } catch (NullPointerException e) {
-            // Expected
+            fail();
+        } catch (NullPointerException exception) {
+        } catch (IndexOutOfBoundsException exception) {
         }
 
         try {
@@ -243,21 +243,19 @@
             // Expected
         }
 
-        // Throws IndexOutOfBoundsException before NullPointerException if count
-        // is negative
         try {
             writer.write((String) null, -1, -1);
-            fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // Expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         // Throws NullPointerException before StringIndexOutOfBoundsException
         try {
             writer.write((String) null, -1, 0);
-            fail("should throw NullPointerException");
-        } catch (NullPointerException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         writer.write("abc", 1, 2);
@@ -271,16 +269,16 @@
         // Throws IndexOutOfBoundsException first if count is negative
         try {
             writer.write((String) null, 0, -1);
-            fail("should throw IndexOutOfBoundsException");
-        } catch (IndexOutOfBoundsException e) {
-            // Expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
             writer.write((String) null, -1, 0);
-            fail("should throw NullPointerException");
-        } catch (NullPointerException e) {
-            // Expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         try {
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java
index 8503df5..6295de5 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java
@@ -90,10 +90,7 @@
                 pis.read();
                 t.interrupt();
             }
-        } catch (IOException e) {
-            if (!e.getMessage().contains("Write end dead")) {
-                throw e;
-            }
+        } catch (IOException expected) {
         } finally {
             try {
                 pis.close();
@@ -222,11 +219,8 @@
         PipedInputStream obj = new PipedInputStream();
         try {
             obj.read(new byte[0], 0, -1);
-            fail("IndexOutOfBoundsException expected");
-        } catch (IndexOutOfBoundsException t) {
-            assertEquals(
-                    "IndexOutOfBoundsException rather than a subclass expected",
-                    IndexOutOfBoundsException.class, t.getClass());
+            fail();
+        } catch (IndexOutOfBoundsException expected) {
         }
     }
 
@@ -237,10 +231,8 @@
         PipedInputStream obj = new PipedInputStream();
         try {
             obj.read(new byte[0], -1, 0);
-            fail("IndexOutOfBoundsException expected");
-        } catch (ArrayIndexOutOfBoundsException t) {
-            fail("IndexOutOfBoundsException expected");
-        } catch (IndexOutOfBoundsException t) {
+            fail();
+        } catch (IndexOutOfBoundsException expected) {
         }
     }
 
@@ -251,10 +243,8 @@
         PipedInputStream obj = new PipedInputStream();
         try {
             obj.read(new byte[0], -1, -1);
-            fail("IndexOutOfBoundsException expected");
-        } catch (ArrayIndexOutOfBoundsException t) {
-            fail("IndexOutOfBoundsException expected");
-        } catch (IndexOutOfBoundsException t) {
+            fail();
+        } catch (IndexOutOfBoundsException expected) {
         }
     }
 
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedOutputStreamTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedOutputStreamTest.java
index 36c315c..a2e4084 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedOutputStreamTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedOutputStreamTest.java
@@ -167,11 +167,8 @@
         try {
             pos = new PipedOutputStream(pis);
             pos.write(new byte[0], -1, -1);
-            fail("IndexOutOfBoundsException expected");
-        } catch (IndexOutOfBoundsException t) {
-            assertEquals(
-                    "IndexOutOfBoundsException rather than a subclass expected",
-                    IndexOutOfBoundsException.class, t.getClass());
+            fail();
+        } catch (IndexOutOfBoundsException expected) {
         }
 
         // Regression for HARMONY-4311
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedWriterTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedWriterTest.java
index 9d3b344..cc0881a 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedWriterTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedWriterTest.java
@@ -201,10 +201,7 @@
             obj = new java.io.PipedWriter(pr);
             obj.write(new char[0], (int) 0, (int) -1);
             fail("IndexOutOfBoundsException expected");
-        } catch (IndexOutOfBoundsException t) {
-            assertEquals(
-                    "IndexOutOfBoundsException rather than a subclass expected",
-                    IndexOutOfBoundsException.class, t.getClass());
+        } catch (IndexOutOfBoundsException expected) {
         }
     }
 
@@ -217,10 +214,8 @@
         try {
             obj = new java.io.PipedWriter(pr);
             obj.write(new char[0], (int) -1, (int) 0);
-            fail("IndexOutOfBoundsException expected");
-        } catch (ArrayIndexOutOfBoundsException t) {
-            fail("IndexOutOfBoundsException expected");
-        } catch (IndexOutOfBoundsException t) {}
+            fail();
+        } catch (IndexOutOfBoundsException expected) {}
     }
 
     /**
@@ -232,10 +227,8 @@
         try {
             obj = new java.io.PipedWriter(pr);
             obj.write(new char[0], (int) -1, (int) -1);
-            fail("IndexOutOfBoundsException expected");
-        } catch (ArrayIndexOutOfBoundsException t) {
-            fail("IndexOutOfBoundsException expected");
-        } catch (IndexOutOfBoundsException t) {}
+            fail();
+        } catch (IndexOutOfBoundsException expected) {}
     }
 
     /**
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringWriterTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringWriterTest.java
index 7adcbb7..e7b21b7 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringWriterTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringWriterTest.java
@@ -98,11 +98,8 @@
         try {
             obj = new StringWriter();
             obj.write(new char[0], (int) 0, (int) -1);
-            fail("IndexOutOfBoundsException expected");
-        } catch (IndexOutOfBoundsException t) {
-            assertEquals(
-                    "IndexOutOfBoundsException rather than a subclass expected",
-                    IndexOutOfBoundsException.class, t.getClass());
+            fail();
+        } catch (IndexOutOfBoundsException expected) {
         }
     }
 
@@ -114,10 +111,8 @@
         try {
             obj = new StringWriter();
             obj.write(new char[0], (int) -1, (int) 0);
-            fail("IndexOutOfBoundsException expected");
-        } catch (ArrayIndexOutOfBoundsException t) {
-            fail("IndexOutOfBoundsException expected");
-        } catch (IndexOutOfBoundsException t) {
+            fail();
+        } catch (IndexOutOfBoundsException expected) {
         }
     }
 
@@ -129,10 +124,8 @@
         try {
             obj = new StringWriter();
             obj.write(new char[0], (int) -1, (int) -1);
-            fail("IndexOutOfBoundsException expected");
-        } catch (ArrayIndexOutOfBoundsException t) {
-            fail("IndexOutOfBoundsException expected");
-        } catch (IndexOutOfBoundsException t) {
+            fail();
+        } catch (IndexOutOfBoundsException expected) {
         }
     }
 
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/CharacterImplTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/CharacterImplTest.java
index 7d9b3af..83a02e7 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/CharacterImplTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/CharacterImplTest.java
@@ -22,7 +22,7 @@
 
     public void test_valueOfC() {
         // test the cache range
-        for (char c = '\u0000'; c < 512; c++) {
+        for (char c = '\u0000'; c < 128; c++) {
             Character e = new Character(c);
             Character a = Character.valueOf(c);
             assertEquals(e, a);
@@ -31,7 +31,7 @@
             assertSame(Character.valueOf(c), Character.valueOf(c));
         }
         // test the rest of the chars
-        for (int c = '\u0512'; c <= Character.MAX_VALUE; c++) {
+        for (int c = 128; c <= Character.MAX_VALUE; c++) {
             assertEquals(new Character((char) c), Character.valueOf((char) c));
         }
     }
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/CharacterTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/CharacterTest.java
index b8db707..2f3d4a6 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/CharacterTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/CharacterTest.java
@@ -22,19 +22,6 @@
 
 public class CharacterTest extends TestCase {
 
-    public void test_valueOfC() {
-        // test the cache range
-        for (char c = '\u0000'; c < 512; c++) {
-            Character e = new Character(c);
-            Character a = Character.valueOf(c);
-            assertEquals(e, a);
-        }
-        // test the rest of the chars
-        for (int c = 512; c <= Character.MAX_VALUE; c++) {
-            assertEquals(new Character((char) c), Character.valueOf((char) c));
-        }
-    }
-
     public void test_isValidCodePointI() {
         assertFalse(Character.isValidCodePoint(-1));
         assertTrue(Character.isValidCodePoint(0));
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ProcessBuilderTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ProcessBuilderTest.java
index fc7726c..540ffe2 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ProcessBuilderTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ProcessBuilderTest.java
@@ -121,10 +121,10 @@
             // expected;
         }
         try {
-            env.get(new Object());
-            fail("should throw ClassCastException.");
-        } catch (ClassCastException e) {
-            // expected;
+            assertNull(env.get(new Object()));
+            // Android's get doesn't throw (because it's just a regular HashMap).
+            // fail("should throw ClassCastException.");
+        } catch (ClassCastException thrownByRi) {
         }
     }
 
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/String2Test.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/String2Test.java
index f79503e..e359d4f 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/String2Test.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/String2Test.java
@@ -347,18 +347,8 @@
         // Test for method byte [] java.lang.String.getBytes()
         byte[] sbytes = hw1.getBytes();
 
-        boolean isEbcdic = Charset.defaultCharset().equals(Charset.forName("IBM1047"));
-        if (!isEbcdic) {
-            for (int i = 0; i < hw1.length(); i++)
-                assertTrue("Returned incorrect bytes", sbytes[i] == (byte) hw1
-                        .charAt(i));
-        } else {
-            // On EBCDIC platforms, getBytes() returns different values
-            // Reference values taken from J9 5.0
-            byte[] expectedValues = {-56, -123, -109, -109, -106, -26, -106,
-                -103, -109, -124};
-            for (int i = 0; i < hw1.length(); i++)
-                assertEquals(expectedValues[i], sbytes[i]);
+        for (int i = 0; i < hw1.length(); i++) {
+            assertTrue("Returned incorrect bytes", sbytes[i] == (byte) hw1.charAt(i));
         }
 
         char[] chars = new char[1];
@@ -435,17 +425,7 @@
         // int)
         byte[] buf = new byte[5];
         "Hello World".getBytes(6, 11, buf, 0);
-
-        boolean isEbcdic = Charset.defaultCharset().equals(Charset.forName("IBM1047"));
-        if (!isEbcdic) {
-            assertEquals("Returned incorrect bytes", "World", new String(buf));
-        } else {
-            // On EBCDIC platforms, getBytes() returns different values
-            // Reference values taken from J9 5.0
-            byte[] expectedValues = {87, 111, 114, 108, 100};
-            for (int i = 0; i < 5; i++)
-                assertEquals(expectedValues[i], buf[i]);
-        }
+        assertEquals("Returned incorrect bytes", "World", new String(buf));
 
         try {
             "Hello World".getBytes(-1, 1, null, 0);
@@ -498,8 +478,8 @@
         try {
             "abc".getBytes((String) null);
             fail("Should throw NullPointerException");
-        } catch (NullPointerException e) {
-            // Expected
+        } catch (UnsupportedEncodingException whatTheRiDocumentsAndWeThrow) {
+        } catch (NullPointerException whatTheRiActuallyThrows) {
         }
 
         try {
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/StringBuffer2Test.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/StringBuffer2Test.java
index 6085b36..2ef6812 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/StringBuffer2Test.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/StringBuffer2Test.java
@@ -352,9 +352,9 @@
 		StringBuffer buf1 = new StringBuffer("abcd");
 		try {
 			buf1.insert(-1, (char[]) null, 0, 0);
-            fail("Should throw StringIndexOutOfBoundsException");
-		} catch (StringIndexOutOfBoundsException e) {
-            //expected
+			fail();
+		} catch (NullPointerException expected) {
+		} catch (StringIndexOutOfBoundsException expected) {
 		}
         
         try {
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/StringTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/StringTest.java
index bec23fd..e0a84a1 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/StringTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/StringTest.java
@@ -20,6 +20,7 @@
 import java.io.UnsupportedEncodingException;
 import java.lang.reflect.Constructor;
 import java.nio.charset.Charset;
+import java.util.Arrays;
 import java.util.SortedMap;
 
 import junit.framework.TestCase;
@@ -633,15 +634,15 @@
         }
         try {
             new String(null, -1, 0, Charset.defaultCharset());
-            fail("should throw StringIndexOutOfBoundsException");
-        } catch (StringIndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (StringIndexOutOfBoundsException expected) {
         }
         try {
             new String(null, 0, -1, Charset.defaultCharset());
-            fail("should throw StringIndexOutOfBoundsException");
-        } catch (StringIndexOutOfBoundsException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (StringIndexOutOfBoundsException expected) {
         }
         try {
             new String(null, 0, 9, Charset.defaultCharset());
@@ -663,15 +664,15 @@
         }
         try {
             new String(new byte[8], -1, 0, (Charset)null);
-            fail("should throw NullPointerException");
-        } catch (NullPointerException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (StringIndexOutOfBoundsException expected) {
         }
         try {
             new String(new byte[8], 0, 9, (Charset)null);
-            fail("should throw NullPointerException");
-        } catch (NullPointerException e) {
-            // expected
+            fail();
+        } catch (NullPointerException expected) {
+        } catch (StringIndexOutOfBoundsException expected) {
         }
         try {
             new String(new byte[8], 0, 4, (Charset)null);
@@ -736,24 +737,9 @@
         }
         assertTrue(bytesEquals(someBytes,new String(someBytes, Charset.defaultCharset()).getBytes(Charset.defaultCharset())));
         SortedMap<String, Charset> charsets = Charset.availableCharsets();
-
-        Charset ascii = charsets.get("US-ASCII");
-        Charset utf8 = charsets.get("UTF-8");
-        if (charsets.size() >= 2){
-            assertTrue(bytesEquals(someBytes,new String(someBytes, charsets.get(charsets.firstKey())).getBytes(charsets.get(charsets.lastKey()))));            
-            assertFalse(bytesEquals("\u4f60\u597d".getBytes(ascii), "\u4f60\u597d".getBytes(utf8)));
-        }
     }
     
     boolean bytesEquals(byte[] bytes1, byte[] bytes2){
-        if (bytes1.length == bytes2.length){
-            for (int i = 0; i < bytes1.length; i++){
-                if (bytes1[i] != bytes2[i]){
-                    return false;
-                }
-            }
-            return true;
-        }
-        return false;
+        return Arrays.toString(bytes1).equals(Arrays.toString(bytes2));
     }
 }
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/SystemTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/SystemTest.java
index 900e258..9b8b699 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/SystemTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/SystemTest.java
@@ -125,8 +125,6 @@
 	public void test_getProperties() {
 		// Test for method java.util.Properties java.lang.System.getProperties()
 		Properties p = System.getProperties();
-		assertTrue("Incorrect properties returned", p.getProperty(
-				"java.version").indexOf("1.", 0) >= 0);
 
 		// Ensure spec'ed properties are non-null. See System.getProperties()
 		// spec.
@@ -150,8 +148,6 @@
 	public void test_getPropertyLjava_lang_String() {
 		// Test for method java.lang.String
 		// java.lang.System.getProperty(java.lang.String)
-		assertTrue("Failed to return correct property value", System
-				.getProperty("java.version").indexOf("1.", 0) >= 0);
 
 		boolean is8859_1 = true;
 		String encoding = System.getProperty("file.encoding");
@@ -208,9 +204,7 @@
 	public void test_getPropertyLjava_lang_StringLjava_lang_String() {
 		// Test for method java.lang.String
 		// java.lang.System.getProperty(java.lang.String, java.lang.String)
-		assertTrue("Failed to return correct property value: "
-				+ System.getProperty("java.version", "99999"), System
-				.getProperty("java.version", "99999").indexOf("1.", 0) >= 0);
+		assertTrue(!System.getProperty("java.version", "99999").equals("99999"));
 		assertEquals("Failed to return correct property value", "bogus", System
 				.getProperty("bogus.prop", "bogus"));
 	}
@@ -387,9 +381,9 @@
 
         try {
             map.remove(null);
-            fail("Should throw UnsupportedOperationException.");
-        } catch (UnsupportedOperationException e) {
-            // expected
+            // Android isn't as strict about requiring this exception; no modification takes place anyway
+            // fail("Should throw UnsupportedOperationException.");
+        } catch (UnsupportedOperationException expected) {
         }
 
     }
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/InetAddressTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
index d705804..85ef09e 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
@@ -47,7 +47,7 @@
                 InetAddress.getByName("unknown.unknown.bad");
                 fail("An UnknownHostException should have been thrown");
             } catch (UnknownHostException e) {
-                assertEquals("unknown.unknown.bad", e.getMessage());
+                assertTrue(e.getMessage().contains("unknown.unknown.bad"));
             }
         }
     }
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ArrayListTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ArrayListTest.java
index 7d24765..639097c 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ArrayListTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ArrayListTest.java
@@ -853,6 +853,7 @@
         Vector v = new Vector();
         v.add("a");
         ArrayList al = new ArrayList(v);
+        al.add("b");
         Iterator it = al.iterator();
         al.trimToSize();
         try {
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/CollectionsTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/CollectionsTest.java
index 0555a78..1b13380 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/CollectionsTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/CollectionsTest.java
@@ -43,7 +43,6 @@
 import java.util.TreeSet;
 import java.util.Arrays;
 
-import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.testframework.serialization.SerializationTest;
 import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
 
@@ -1977,11 +1976,8 @@
     		
    		try {
    			m.invoke(null, new Object(), int.class);
-   			fail("should throw InvocationTargetException");
-   		} catch (InvocationTargetException e) {
-            String errMsg = Messages.getString(
-                    "luni.05", Object.class, int.class);
-   			assertEquals(errMsg, e.getCause().getMessage());
+   			fail();
+   		} catch (InvocationTargetException expected) {
    		}
     }
     
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/FormatterTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/FormatterTest.java
index 5468914..92698bb 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/FormatterTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/FormatterTest.java
@@ -991,21 +991,23 @@
         Formatter f = null;
 
         String oldSeparator = System.getProperty("line.separator");
-        System.setProperty("line.separator", "!\n");
+        try {
+            System.setProperty("line.separator", "!\n");
 
-        f = new Formatter(Locale.US);
-        f.format("%1$n", 1);
-        assertEquals("!\n", f.toString());
+            f = new Formatter(Locale.US);
+            f.format("%1$n", 1);
+            assertEquals("!\n", f.toString());
 
-        f = new Formatter(Locale.KOREAN);
-        f.format("head%1$n%2$n", 1, new Date());
-        assertEquals("head!\n!\n", f.toString());
+            f = new Formatter(Locale.KOREAN);
+            f.format("head%1$n%2$n", 1, new Date());
+            assertEquals("head!\n!\n", f.toString());
 
-        f = new Formatter(Locale.US);
-        f.format("%n%s", "hello");
-        assertEquals("!\nhello", f.toString());
-
-        System.setProperty("line.separator", oldSeparator);
+            f = new Formatter(Locale.US);
+            f.format("%n%s", "hello");
+            assertEquals("!\nhello", f.toString());
+        } finally {
+            System.setProperty("line.separator", oldSeparator);
+        }
 
         f = new Formatter(Locale.US);
         try {
@@ -2752,48 +2754,38 @@
          */
         f = new Formatter(Locale.US);
         try {
-            // compare IllegalFormatConversionException and
-            // FormatFlagsConversionMismatchException
             f.format("%(o", false);
-            fail("should throw IllegalFormatConversionException");
-        } catch (IllegalFormatConversionException e) {
-            // expected
+            fail();
+        } catch (FormatFlagsConversionMismatchException expected) {
+        } catch (IllegalFormatConversionException expected) {
         }
 
         try {
-            // compare IllegalFormatPrecisionException and
-            // IllegalFormatConversionException
             f.format("%.4o", false);
-            fail("should throw IllegalFormatPrecisionException");
-        } catch (IllegalFormatPrecisionException e) {
-            // expected
+            fail();
+        } catch (IllegalFormatPrecisionException expected) {
+        } catch (IllegalFormatConversionException expected) {
         }
 
         try {
-            // compare IllegalFormatFlagsException and
-            // IllegalFormatPrecisionException
             f.format("%+ .4o", big);
-            fail("should throw IllegalFormatFlagsException");
-        } catch (IllegalFormatFlagsException e) {
-            // expected
+            fail();
+        } catch (IllegalFormatPrecisionException expected) {
+        } catch (IllegalFormatFlagsException expected) {
         }
 
         try {
-            // compare MissingFormatWidthException and
-            // IllegalFormatFlagsException
             f.format("%+ -o", big);
-            fail("should throw MissingFormatWidthException");
-        } catch (MissingFormatWidthException e) {
-            // expected
+            fail();
+        } catch (MissingFormatWidthException expected) {
+        } catch (IllegalFormatFlagsException expected) {
         }
 
         try {
-            // compare UnknownFormatConversionException and
-            // MissingFormatWidthException
             f.format("%-O", big);
-            fail("should throw UnknownFormatConversionException");
-        } catch (UnknownFormatConversionException e) {
-            // expected
+            fail();
+        } catch (MissingFormatWidthException expected) {
+        } catch (UnknownFormatConversionException expected) {
         }
     }
     
diff --git a/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalConstructorsTest.java b/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalConstructorsTest.java
index 8421fc5..3838991 100644
--- a/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalConstructorsTest.java
+++ b/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalConstructorsTest.java
@@ -244,8 +244,6 @@
             new BigDecimal(a);
             fail("NumberFormatException has not been caught");
         } catch (NumberFormatException e) {
-            assertEquals("Improper exception message", "Infinite or NaN", e
-                    .getMessage());
         }
     }
 
@@ -258,8 +256,6 @@
             new BigDecimal(a);
             fail("NumberFormatException has not been caught");
         } catch (NumberFormatException e) {
-            assertEquals("Improper exception message", "Infinite or NaN",
-                    e.getMessage());
         }
     }
 
@@ -272,8 +268,6 @@
             new BigDecimal(a);
             fail("NumberFormatException has not been caught");
         } catch (NumberFormatException e) {
-            assertEquals("Improper exception message", "Infinite or NaN",
-                    e.getMessage());
         }
     }
 
@@ -491,8 +485,6 @@
            new BigDecimal(a);
            fail("NumberFormatException expected");
        } catch (NumberFormatException e) {
-           assertEquals("Improper exception message","Scale out of range.", 
-               e.getMessage());
        }
     }
 
diff --git a/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalScaleOperationsTest.java b/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalScaleOperationsTest.java
index 3dd7417..6c74dee 100644
--- a/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalScaleOperationsTest.java
+++ b/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalScaleOperationsTest.java
@@ -332,7 +332,6 @@
             aNumber.movePointRight(shift);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertEquals("Improper exception message", "Underflow", e.getMessage());
         }
     }
 
diff --git a/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java b/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java
index ac3eb16..051ba5e 100644
--- a/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java
+++ b/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java
@@ -40,7 +40,6 @@
             new BigInteger(aBytes);
             fail("NumberFormatException has not been caught");
         } catch (NumberFormatException e) {
-            assertEquals("Improper exception message", "Zero length BigInteger", e.getMessage());
         }
     }
     
@@ -198,7 +197,6 @@
             new BigInteger(aSign, aBytes);
             fail("NumberFormatException has not been caught");
         } catch (NumberFormatException e) {
-            assertEquals("Improper exception message", "Invalid signum value", e.getMessage());
         }
     }
     
@@ -580,7 +578,6 @@
             new BigInteger(value, radix);
             fail("NumberFormatException has not been caught");
         } catch (NumberFormatException e) {
-            assertEquals("Improper exception message", "Radix out of range", e.getMessage());
         }
     }
     
diff --git a/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerDivideTest.java b/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerDivideTest.java
index 7656d87..3f2ab51 100644
--- a/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerDivideTest.java
+++ b/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerDivideTest.java
@@ -42,7 +42,6 @@
             aNumber.divide(bNumber);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertEquals("Improper exception message", "BigInteger divide by zero", e.getMessage());
         }
     }
 
@@ -58,7 +57,6 @@
             aNumber.divide(bNumber);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertEquals("Improper exception message", "BigInteger divide by zero", e.getMessage());
         }
     }
 
@@ -411,7 +409,6 @@
             aNumber.remainder(bNumber);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertEquals("Improper exception message", "BigInteger divide by zero", e.getMessage());
         }
     }
 
@@ -624,7 +621,6 @@
             aNumber.mod(bNumber);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertEquals("Improper exception message", "BigInteger: modulus not positive", e.getMessage());
         }
     }
 
diff --git a/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerModPowTest.java b/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerModPowTest.java
index a5985c3..4af4d9d 100644
--- a/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerModPowTest.java
+++ b/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerModPowTest.java
@@ -45,7 +45,6 @@
 			aNumber.modPow(exp, modulus);
 			fail("ArithmeticException has not been caught");
 		} catch (ArithmeticException e) {
-			assertEquals("Improper exception message", "BigInteger: modulus not positive", e.getMessage());
 		}
 
         try {
@@ -139,7 +138,6 @@
 			aNumber.modInverse(modulus);
 			fail("ArithmeticException has not been caught");
 		} catch (ArithmeticException e) {
-			assertEquals("Improper exception message", "BigInteger: modulus not positive", e.getMessage());
 		}
 	}
 	
@@ -157,7 +155,6 @@
 			aNumber.modInverse(modulus);
 			fail("ArithmeticException has not been caught");
 		} catch (ArithmeticException e) {
-			assertEquals("Improper exception message", "BigInteger not invertible.", e.getMessage());
 		}
 	}
 
diff --git a/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerMultiplyTest.java b/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerMultiplyTest.java
index 1912345..0bfcbf0 100644
--- a/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerMultiplyTest.java
+++ b/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerMultiplyTest.java
@@ -285,7 +285,6 @@
             aNumber.pow(exp);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertEquals("Improper exception message", "Negative exponent", e.getMessage());
         }
     }
 
diff --git a/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java b/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java
index abc934f..9b7c198 100644
--- a/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java
+++ b/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java
@@ -133,7 +133,6 @@
             aNumber.clearBit(number);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertEquals("Improper exception message", "Negative bit address", e.getMessage());
         }
     }
 
@@ -440,7 +439,6 @@
             aNumber.flipBit(number);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertEquals("Improper exception message", "Negative bit address", e.getMessage());
         }
     }
 
@@ -730,7 +728,6 @@
             aNumber.setBit(number);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertEquals("Improper exception message", "Negative bit address", e.getMessage());
         }
     }
 
@@ -1307,7 +1304,6 @@
             aNumber.testBit(number);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertEquals("Improper exception message", "Negative bit address", e.getMessage());
         }
     }
 
diff --git a/math/src/test/java/tests/api/java/math/BigDecimalTest.java b/math/src/test/java/tests/api/java/math/BigDecimalTest.java
index c6be15e..4fd27bf 100644
--- a/math/src/test/java/tests/api/java/math/BigDecimalTest.java
+++ b/math/src/test/java/tests/api/java/math/BigDecimalTest.java
@@ -912,12 +912,11 @@
 				((notrailingzerotest.stripTrailingZeros()).scale() == 0)
 				);
 		
+                // BEGIN android-changed: preserve RI compatibility, so BigDecimal.equals (which checks
+                // value *and* scale) continues to work. https://issues.apache.org/jira/browse/HARMONY-4623
 		/* Zero */
-        //regression for HARMONY-4623, NON-BUG DIFF with RI
 		BigDecimal zerotest = new BigDecimal("0.0000");
-		assertTrue("stripTrailingZero failed for 0.0000",
-				((zerotest.stripTrailingZeros()).scale() == 0)
-				);		
+                assertEquals("stripTrailingZero failed for 0.0000", 4, zerotest.stripTrailingZeros().scale());
 	}	
 
 	public void testMathContextConstruction() {
diff --git a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/CharBufferTest.java b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/CharBufferTest.java
index aa9c63e..8a7c5f3 100644
--- a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/CharBufferTest.java
+++ b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/CharBufferTest.java
@@ -381,8 +381,8 @@
         try {
             buf.get(array, 1, Integer.MAX_VALUE);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (BufferUnderflowException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
         try {
             buf.get(array, Integer.MAX_VALUE, 1);
@@ -540,8 +540,8 @@
         try {
             buf.put(array, 1, Integer.MAX_VALUE);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (BufferOverflowException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
 		assertEquals(buf.position(), 0);
 
diff --git a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/DoubleBufferTest.java b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/DoubleBufferTest.java
index 5759b36..40ff2e0 100644
--- a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/DoubleBufferTest.java
+++ b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/DoubleBufferTest.java
@@ -349,8 +349,8 @@
         try {
             buf.get(array, 1, Integer.MAX_VALUE);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (BufferUnderflowException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
         try {
             buf.get(array, Integer.MAX_VALUE, 1);
@@ -510,8 +510,8 @@
         try {
             buf.put(array, 1, Integer.MAX_VALUE);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (BufferOverflowException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
         assertEquals(buf.position(), 0);
 
diff --git a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/FloatBufferTest.java b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/FloatBufferTest.java
index d88a188..cfef096 100644
--- a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/FloatBufferTest.java
+++ b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/FloatBufferTest.java
@@ -347,8 +347,8 @@
         try {
             buf.get(array, 1, Integer.MAX_VALUE);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (BufferUnderflowException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
         try {
             buf.get(array, Integer.MAX_VALUE, 1);
@@ -515,8 +515,8 @@
         try {
             buf.put(array, 1, Integer.MAX_VALUE);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (BufferOverflowException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
         assertEquals(buf.position(), 0);
 
diff --git a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/IntBufferTest.java b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/IntBufferTest.java
index db53516..97babcf 100644
--- a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/IntBufferTest.java
+++ b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/IntBufferTest.java
@@ -325,8 +325,8 @@
         try {
             buf.get(array, 1, Integer.MAX_VALUE);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (BufferUnderflowException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
         try {
             buf.get(array, Integer.MAX_VALUE, 1);
@@ -491,8 +491,8 @@
         try {
             buf.put(array, 1, Integer.MAX_VALUE);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (BufferOverflowException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
         assertEquals(buf.position(), 0);
 
diff --git a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/LongBufferTest.java b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/LongBufferTest.java
index 44ca39e..371351b 100644
--- a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/LongBufferTest.java
+++ b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/LongBufferTest.java
@@ -326,8 +326,8 @@
         try {
             buf.get(array, 1, Integer.MAX_VALUE);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (BufferUnderflowException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
         try {
             buf.get(array, Integer.MAX_VALUE, 1);
@@ -498,8 +498,8 @@
         try {
             buf.put(array, 1, Integer.MAX_VALUE);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (BufferOverflowException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
         assertEquals(buf.position(), 0);
 
diff --git a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ReadOnlyCharBufferTest.java b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ReadOnlyCharBufferTest.java
index e84cc9c..f951962 100644
--- a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ReadOnlyCharBufferTest.java
+++ b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ReadOnlyCharBufferTest.java
@@ -173,14 +173,14 @@
         try {
             buf.put((String) null, 0, 0);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (NullPointerException e) {
-            // expected
+        } catch (ReadOnlyBufferException expected) {
+        } catch (NullPointerException expected) {
         }
         try {
             buf.put(str, -1, str.length());
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (ReadOnlyBufferException expected) {
+        } catch (NullPointerException expected) {
         }
         String longStr = String.valueOf(new char[buf.capacity()+1]);
         try {
diff --git a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ShortBufferTest.java b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ShortBufferTest.java
index 6ff3ce3..98d7659 100644
--- a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ShortBufferTest.java
+++ b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ShortBufferTest.java
@@ -312,8 +312,8 @@
         try {
             buf.get(array, 1, Integer.MAX_VALUE);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (BufferUnderflowException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
         try {
             buf.get(array, Integer.MAX_VALUE, 1);
@@ -478,8 +478,8 @@
         try {
             buf.put(array, 1, Integer.MAX_VALUE);
             fail("Should throw Exception"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (BufferOverflowException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
         assertEquals(buf.position(), 0);
 
diff --git a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/WrappedCharBufferTest2.java b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/WrappedCharBufferTest2.java
index 1e98d63..c0a4aac 100644
--- a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/WrappedCharBufferTest2.java
+++ b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/WrappedCharBufferTest2.java
@@ -88,20 +88,20 @@
         try {
             buf.put((char[]) null, 0, 1);
             fail("Should throw NullPointerException"); //$NON-NLS-1$
-        } catch (NullPointerException e) {
-            // expected
+        } catch (ReadOnlyBufferException expected) {
+        } catch (NullPointerException expected) {
         }
         try {
             buf.put(new char[buf.capacity() + 1], 0, buf.capacity() + 1);
             fail("Should throw BufferOverflowException"); //$NON-NLS-1$
-        } catch (BufferOverflowException e) {
-            // expected
+        } catch (ReadOnlyBufferException expected) {
+        } catch (BufferOverflowException expected) {
         }
         try {
             buf.put(array, -1, array.length);
             fail("Should throw IndexOutOfBoundsException"); //$NON-NLS-1$
-        } catch (IndexOutOfBoundsException e) {
-            // expected
+        } catch (ReadOnlyBufferException expected) {
+        } catch (IndexOutOfBoundsException expected) {
         }
     }
 
diff --git a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/ChannelsTest.java b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/ChannelsTest.java
index 35ecebf..4223fb8 100644
--- a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/ChannelsTest.java
+++ b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/ChannelsTest.java
@@ -116,13 +116,12 @@
         ByteBuffer byteBuf = ByteBuffer.allocate(this.testNum);
         this.fins = null;
         int readres = this.testNum;
-        ReadableByteChannel rbChannel = Channels.newChannel(this.fins);
-        assertNotNull(rbChannel);
         try {
+            ReadableByteChannel rbChannel = Channels.newChannel(this.fins);
+            assertNotNull(rbChannel);
             readres = rbChannel.read(byteBuf);
             fail();
-        } catch (NullPointerException e) {
-            // correct
+        } catch (NullPointerException expected) {
         }
         assertEquals(this.testNum, readres);
     }
@@ -188,15 +187,15 @@
             writebuf.putChar((char) (val + 64));
         }
         this.fouts = null;
-        WritableByteChannel rbChannel = Channels.newChannel(this.fouts);
-        writeres = rbChannel.write(writebuf);
-        assertEquals(0, writeres);
-
-        writebuf.flip();
         try {
+            WritableByteChannel rbChannel = Channels.newChannel(this.fouts);
+            writeres = rbChannel.write(writebuf);
+            assertEquals(0, writeres);
+
+            writebuf.flip();
             writeres = rbChannel.write(writebuf);
             fail("Should throw NPE.");
-        } catch (NullPointerException e) {
+        } catch (NullPointerException expected) {
         }
     }
 
@@ -275,23 +274,14 @@
         ReadableByteChannel readbc = this.fins.getChannel();
         assertEquals(this.fileSize, this.fins.available());
         assertTrue(readbc.isOpen());
-        InputStream testins = Channels.newInputStream(null);
-        assertNotNull(testins);
 
         try {
+            InputStream testins = Channels.newInputStream(null);
+            assertNotNull(testins);
             testins.read(readbuf);
             fail();
-        } catch (NullPointerException e) {
-            // correct
+        } catch (NullPointerException expected) {
         }
-        assertEquals(0, testins.available());
-        try {
-            testins.close();
-            fail();
-        } catch (NullPointerException e) {
-            // correct
-        }
-
     }
 
     public void testNewInputStreamReadableByteChannel() throws Exception {
@@ -324,29 +314,20 @@
     public void testNewOutputStreamWritableByteChannel_InputNull()
             throws Exception {
         byte[] writebuf = new byte[this.testNum];
-        OutputStream testouts = Channels.newOutputStream(null);
-        assertNotNull(testouts);
         try {
+            OutputStream testouts = Channels.newOutputStream(null);
+            assertNotNull(testouts);
             testouts.write(writebuf);
             fail();
-        } catch (NullPointerException e) {
-            // correct
+        } catch (NullPointerException expected) {
         }
-        testouts.flush();
         try {
-            testouts.close();
-            fail();
-        } catch (NullPointerException e) {
-            // correct
-        }
-        WritableByteChannel writebc = Channels.newChannel((OutputStream) null);
-        assertTrue(writebc.isOpen());
-        OutputStream testoutputS = Channels.newOutputStream(writebc);
-        try {
+            WritableByteChannel writebc = Channels.newChannel((OutputStream) null);
+            assertTrue(writebc.isOpen());
+            OutputStream testoutputS = Channels.newOutputStream(writebc);
             testoutputS.write(writebuf);
             fail();
-        } catch (NullPointerException e) {
-            // correct
+        } catch (NullPointerException expected) {
         }
     }
 
@@ -414,33 +395,25 @@
         CharBuffer charBuf = CharBuffer.allocate(bufSize);
         this.fins = new FileInputStream(tmpFile);
         // channel null
-        Reader testReader = Channels.newReader(null, Charset.forName(CODE_SET)
-                .newDecoder(), -1);
-        assertNotNull(testReader);
-        assertFalse(testReader.ready());
+        Reader testReader;
         try {
+            testReader = Channels.newReader(null, Charset.forName(CODE_SET).newDecoder(), -1);
+            assertNotNull(testReader);
+            assertFalse(testReader.ready());
             readres = testReader.read((CharBuffer) null);
             fail();
         } catch (NullPointerException e) {
             // correct
         }
         assertEquals(0, readres);
-        try {
-            readres = testReader.read(charBuf);
-            fail();
-        } catch (NullPointerException e) {
-            // correct
-        }
 
         this.fins = null;
-        ReadableByteChannel rbChannel = Channels.newChannel(this.fins);
         // channel with null inputs
-        testReader = Channels.newReader(rbChannel, Charset.forName(CODE_SET)
-                .newDecoder(), //$NON-NLS-1$
-                -1);
-        assertNotNull(testReader);
-        assertFalse(testReader.ready());
         try {
+            ReadableByteChannel rbChannel = Channels.newChannel(this.fins);
+            testReader = Channels.newReader(rbChannel, Charset.forName(CODE_SET).newDecoder(), -1);
+            assertNotNull(testReader);
+            assertFalse(testReader.ready());
             readres = testReader.read(charBuf);
             fail();
         } catch (NullPointerException e) {
@@ -459,33 +432,24 @@
         CharBuffer charBuf = CharBuffer.allocate(bufSize);
         this.fins = new FileInputStream(tmpFile);
         // channel null
-        Reader testReader = Channels.newReader(null, Charset.forName(CODE_SET)
-                .newDecoder(), //$NON-NLS-1$
-                0);
-        assertNotNull(testReader);
-        assertFalse(testReader.ready());
+        Reader testReader;
         try {
+            testReader = Channels.newReader(null, Charset.forName(CODE_SET).newDecoder(), 0);
+            assertNotNull(testReader);
+            assertFalse(testReader.ready());
             readres = testReader.read((CharBuffer) null);
             fail();
-        } catch (NullPointerException e) {
-            // correct
+        } catch (NullPointerException expected) {
         }
         assertEquals(0, readres);
-        try {
-            readres = testReader.read(charBuf);
-            fail();
-        } catch (NullPointerException e) {
-            // correct
-        }
+
         this.fins = null;
-        ReadableByteChannel rbChannel = Channels.newChannel(this.fins);
         // channel with null inputs
-        testReader = Channels.newReader(rbChannel, Charset.forName(CODE_SET)
-                .newDecoder(), //$NON-NLS-1$
-                -1);
-        assertNotNull(testReader);
-        assertFalse(testReader.ready());
         try {
+            ReadableByteChannel rbChannel = Channels.newChannel(this.fins);
+            testReader = Channels.newReader(rbChannel, Charset.forName(CODE_SET).newDecoder(), -1);
+            assertNotNull(testReader);
+            assertFalse(testReader.ready());
             readres = testReader.read(charBuf);
             fail();
         } catch (NullPointerException e) {
@@ -541,43 +505,16 @@
             writebuf = writebuf + ((char) (val + 64));
         }
         // null channel
-        Writer testWriter = Channels.newWriter(null, Charset.forName(CODE_SET)
-                .newEncoder(), //$NON-NLS-1$
-                -1);
-        // can write to buffer
-        testWriter.write(writebuf);
         try {
-            testWriter.flush();
-            fail();
-        } catch (NullPointerException e) {
-            // correct
-        }
-        try {
-            testWriter.close();
-            fail();
-        } catch (NullPointerException e) {
-            // correct
+            Writer testWriter = Channels.newWriter(null, Charset.forName(CODE_SET).newEncoder(), -1);
+        } catch (NullPointerException expected) {
         }
 
         // channel with null input
         this.fouts = null;
-        WritableByteChannel wbChannel = Channels.newChannel(this.fouts);
-        testWriter = Channels.newWriter(wbChannel, Charset.forName(CODE_SET)
-                .newEncoder(), //$NON-NLS-1$
-                -1);
-        // can write to buffer
-        testWriter.write(writebuf);
         try {
-            testWriter.flush();
-            fail();
-        } catch (NullPointerException e) {
-            // correct
-        }
-        try {
-            testWriter.close();
-            fail();
-        } catch (NullPointerException e) {
-            // correct
+            WritableByteChannel wbChannel = Channels.newChannel(this.fouts);
+        } catch (NullPointerException expected) {
         }
     }
 
@@ -668,14 +605,16 @@
 		assertFalse(sc.isBlocking());
 
 		Reader reader = Channels.newReader(sc, "UTF16");
-		int i = reader.read();
-		assertEquals(-1, i);
+		try {
+			int i = reader.read();
+			fail("should throw IllegalBlockingModeException");
+		} catch (IllegalBlockingModeException expected) {
+		}
 
 		try {
 			Channels.newInputStream(sc).read();
 			fail("should throw IllegalBlockingModeException");
-		} catch (IllegalBlockingModeException e) {
-			// expected
+		} catch (IllegalBlockingModeException expected) {
 		}
 
 		sc.close();
diff --git a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java
index 9875753..91d7eff 100644
--- a/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java
+++ b/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java
@@ -356,7 +356,7 @@
         assertFalse(s.getBroadcast());
         assertFalse(s.getReuseAddress());
         assertNull(s.getInetAddress());
-        assertEquals(s.getLocalAddress().getHostAddress(), "0.0.0.0");
+        assertEquals(s.getLocalAddress().isAnyLocalAddress());
         assertEquals(s.getLocalPort(), 0);
         assertNull(s.getLocalSocketAddress());
         assertEquals(s.getPort(), -1);
diff --git a/text/src/test/java/org/apache/harmony/text/tests/java/text/SimpleDateFormatTest.java b/text/src/test/java/org/apache/harmony/text/tests/java/text/SimpleDateFormatTest.java
index e94d76e..100085b 100644
--- a/text/src/test/java/org/apache/harmony/text/tests/java/text/SimpleDateFormatTest.java
+++ b/text/src/test/java/org/apache/harmony/text/tests/java/text/SimpleDateFormatTest.java
@@ -610,8 +610,8 @@
                 Calendar.JANUARY, 1, 0, 0, 59).getTime(), 0, 4);
         test.parse("m:s", "59:0", new GregorianCalendar(1970, Calendar.JANUARY,
                 1, 0, 59, 0).getTime(), 0, 4);
-//        test.parse("ms", "059", new GregorianCalendar(1970, Calendar.JANUARY,
-//                1, 0, 0, 59).getTime(), 0, 3);
+        test.parse("ms", "059", new GregorianCalendar(1970, Calendar.JANUARY,
+                1, 0, 0, 59).getTime(), 0, 3);
 
         cal = new GregorianCalendar(1970, Calendar.JANUARY, 1);
         test.parse("S", "0", cal.getTime(), 0, 1);
@@ -621,7 +621,7 @@
 
         cal = new GregorianCalendar(1970, Calendar.JANUARY, 1);
         cal.set(Calendar.ERA, GregorianCalendar.BC);
-//        test.parse("G", "Bc ", cal.getTime(), 0, 2);
+        test.parse("G", "Bc ", cal.getTime(), 0, 2);
 
         test.parse("y", "00", new GregorianCalendar(2000, Calendar.JANUARY, 1)
                 .getTime(), 0, 2);
