Repository: googleapis/java-spanner-jdbc
Pull request #1697 (2024-08-01 11:00:55)

deps: update dependency org.hamcrest:hamcrest to v3
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.hamcrest:hamcrest](http://hamcrest.org/JavaHamcrest/) ([source](https://togithub.com/hamcrest/JavaHamcrest)) | `2.2` -> `3.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/org.hamcrest:hamcrest/3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.hamcrest:hamcrest/3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.hamcrest:hamcrest/2.2/3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.hamcrest:hamcrest/2.2/3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>hamcrest/JavaHamcrest (org.hamcrest:hamcrest)</summary>

### [`v3.0`](https://togithub.com/hamcrest/JavaHamcrest/blob/HEAD/CHANGES.md#Version-30-1st-August-2024)

[Compare Source](https://togithub.com/hamcrest/JavaHamcrest/compare/v2.2...v3.0)

##### Breaking Changes

-   From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode,
    and is not compatible with previous versions of Java. See
    [Issue #&#8203;331](https://togithub.com/hamcrest/JavaHamcrest/issues/331) and
    [PR #&#8203;411](https://togithub.com/hamcrest/JavaHamcrest/issues/411) for details. Developers who use Java 1.7 earlier can still
    depend upon `hamcrest-2.2.jar`.

##### Improvements

-   FileMatchersTest simplification ([PR #&#8203;389](https://togithub.com/hamcrest/JavaHamcrest/issues/389))
-   License cleanup ([PR #&#8203;414](https://togithub.com/hamcrest/JavaHamcrest/issues/414),
    [PR #&#8203;415](https://togithub.com/hamcrest/JavaHamcrest/issues/415), see also
    [#&#8203;264](https://togithub.com/hamcrest/JavaHamcrest/issues/264),
    [#&#8203;355](https://togithub.com/hamcrest/JavaHamcrest/issues/355),
    [#&#8203;396](https://togithub.com/hamcrest/JavaHamcrest/issues/396),and
    [#&#8203;399](https://togithub.com/hamcrest/JavaHamcrest/issues/399))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/java-spanner-jdbc).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->


dpebot: /gcbrun
dpebot: /gcbrun
forking-renovate[bot]: ### Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

 ⚠️ **Warning**: custom changes will be lost.

Patch:
diff --git a/pom.xml b/pom.xml
index 9cece1c..59adb9d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,6 @@
     <findbugs.version>3.0.2</findbugs.version>
     <truth.version>1.4.4</truth.version>
     <mockito.version>4.11.0</mockito.version>
-    <hamcrest.version>2.2</hamcrest.version>
     <opencensus.version>0.31.1</opencensus.version>
   </properties>
 
@@ -182,23 +181,11 @@
           </exclusion>
         </exclusions>
     </dependency>
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest</artifactId>
-      <version>${hamcrest.version}</version>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
       <version>${mockito.version}</version>
       <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>org.hamcrest</groupId>
-          <artifactId>hamcrest-core</artifactId>
-        </exclusion>
-      </exclusions>
     </dependency>
     <dependency>
       <groupId>junit</groupId>


Test patch:
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/JdbcBlobTest.java b/src/test/java/com/google/cloud/spanner/jdbc/JdbcBlobTest.java
index 46b85fe..e7be0ec 100644
--- a/src/test/java/com/google/cloud/spanner/jdbc/JdbcBlobTest.java
+++ b/src/test/java/com/google/cloud/spanner/jdbc/JdbcBlobTest.java
@@ -16,9 +16,10 @@
 
 package com.google.cloud.spanner.jdbc;
 
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThrows;
+import static org.junit.Assert.assertTrue;
 
 import com.google.rpc.Code;
 import java.io.IOException;
@@ -74,35 +75,31 @@ public class JdbcBlobTest {
   @Test
   public void testLength() throws SQLException {
     JdbcBlob blob = new JdbcBlob();
-    assertThat(blob.length(), is(equalTo(0L)));
+    assertEquals(0L, blob.length());
     blob.setBytes(1L, new byte[] {1, 2, 3});
-    assertThat(blob.length(), is(equalTo(3L)));
+    assertEquals(3L, blob.length());
     blob.free();
-    assertThat(blob.length(), is(equalTo(0L)));
+    assertEquals(0L, blob.length());
   }
 
   @Test
   public void testGetBytes() throws SQLException {
     JdbcBlob blob = new JdbcBlob();
     blob.setBytes(1L, new byte[] {1, 2, 3, 4, 5});
-    assertThat(blob.getBytes(1L, 5), is(equalTo(new byte[] {1, 2, 3, 4, 5})));
-    assertThat(blob.getBytes(2L, 5), is(equalTo(new byte[] {2, 3, 4, 5})));
-    assertThat(blob.getBytes(2L, 3), is(equalTo(new byte[] {2, 3, 4})));
-    assertThat(blob.getBytes(1L, 0), is(equalTo(new byte[] {})));
+    assertArrayEquals(new byte[] {1, 2, 3, 4, 5}, blob.getBytes(1L, 5));
+    assertArrayEquals(new byte[] {2, 3, 4, 5}, blob.getBytes(2L, 5));
+    assertArrayEquals(new byte[] {2, 3, 4}, blob.getBytes(2L, 3));
+    assertArrayEquals(new byte[] {}, blob.getBytes(1L, 0));
 
     // test invalid parameters
     PosLength[] params =
         new PosLength[] {PosLength.of(0L, 4), PosLength.of(-1L, 4), PosLength.of(1L, -1)};
     for (PosLength param : params) {
-      boolean exception = false;
-      try {
-        blob.getBytes(param.pos, param.len);
-      } catch (SQLException e) {
-        exception =
-            (e instanceof JdbcSqlException
-                && ((JdbcSqlException) e).getCode() == Code.INVALID_ARGUMENT);
-      }
-      assertThat(param.toString(), exception, is(true));
+      SQLException sqlException =
+          assertThrows(SQLException.class, () -> blob.getBytes(param.pos, param.len));
+      assertTrue(sqlException instanceof JdbcSqlException);
+      JdbcSqlException jdbcSqlException = (JdbcSqlException) sqlException;
+      assertEquals(Code.INVALID_ARGUMENT, jdbcSqlException.getCode());
     }
   }
 
@@ -119,31 +116,31 @@ public class JdbcBlobTest {
         index++;
       }
     }
-    assertThat(buf, is(equalTo(new byte[] {1, 2, 3, 4, 5})));
+    assertArrayEquals(new byte[] {1, 2, 3, 4, 5}, buf);
 
     buf = new byte[10];
     try (InputStream is = blob.getBinaryStream()) {
-      assertThat(is.read(buf), is(equalTo(5)));
-      assertThat(is.read(), is(equalTo(-1)));
+      assertEquals(5, is.read(buf));
+      assertEquals(-1, is.read());
     }
-    assertThat(buf, is(equalTo(new byte[] {1, 2, 3, 4, 5, 0, 0, 0, 0, 0})));
+    assertArrayEquals(new byte[] {1, 2, 3, 4, 5, 0, 0, 0, 0, 0}, buf);
   }
 
   @Test
   public void testPosition() throws SQLException {
     JdbcBlob blob = new JdbcBlob();
     blob.setBytes(1L, new byte[] {1, 2, 3, 4, 5});
-    assertThat(blob.position(new byte[] {1}, 1L), is(equalTo(1L)));
-    assertThat(blob.position(new byte[] {1, 2}, 1L), is(equalTo(1L)));
-    assertThat(blob.position(new byte[] {2}, 1L), is(equalTo(2L)));
+    assertEquals(1L, blob.position(new byte[] {1}, 1L));
+    assertEquals(1L, blob.position(new byte[] {1, 2}, 1L));
+    assertEquals(2L, blob.position(new byte[] {2}, 1L));
     // note that the spec says that the method should return the position within the BLOB where the
     // pattern can be found, so it's not relative to the starting position.
-    assertThat(blob.position(new byte[] {2}, 2L), is(equalTo(2L)));
-    assertThat(blob.position(new byte[] {1, 2, 3, 4, 5}, 1L), is(equalTo(1L)));
-    assertThat(blob.position(new byte[] {1, 2, 3, 4, 5, 6}, 1L), is(equalTo(-1L)));
-    assertThat(blob.position(new byte[] {1, 2, 3, 4, 5}, 2L), is(equalTo(-1L)));
-    assertThat(blob.position(new byte[] {2}, 3L), is(equalTo(-1L)));
-    assertThat(blob.position(new byte[] {1}, 6L), is(equalTo(-1L)));
+    assertEquals(2L, blob.position(new byte[] {2}, 2L));
+    assertEquals(1L, blob.position(new byte[] {1, 2, 3, 4, 5}, 1L));
+    assertEquals(-1L, blob.position(new byte[] {1, 2, 3, 4, 5, 6}, 1L));
+    assertEquals(-1L, blob.position(new byte[] {1, 2, 3, 4, 5}, 2L));
+    assertEquals(-1L, blob.position(new byte[] {2}, 3L));
+    assertEquals(-1L, blob.position(new byte[] {1}, 6L));
 
     // test invalid parameters
     PosBytes[] params =
@@ -151,15 +148,11 @@ public class JdbcBlobTest {
           PosBytes.of(0L, new byte[] {}), PosBytes.of(-1L, new byte[] {}), PosBytes.of(1L, null)
         };
     for (PosBytes param : params) {
-      boolean exception = false;
-      try {
-        blob.position(param.bytes, param.pos);
-      } catch (SQLException e) {
-        exception =
-            (e instanceof JdbcSqlException
-                && ((JdbcSqlException) e).getCode() == Code.INVALID_ARGUMENT);
-      }
-      assertThat(param.toString(), exception, is(true));
+      SQLException sqlException =
+          assertThrows(SQLException.class, () -> blob.position(param.bytes, param.pos));
+      assertTrue(sqlException instanceof JdbcSqlException);
+      JdbcSqlException jdbcSqlException = (JdbcSqlException) sqlException;
+      assertEquals(Code.INVALID_ARGUMENT, jdbcSqlException.getCode());
     }
   }
 
@@ -168,17 +161,17 @@ public class JdbcBlobTest {
     JdbcBlob blob = new JdbcBlob();
     blob.setBytes(1L, new byte[] {1, 2, 3, 4, 5});
 
-    assertThat(blob.position(createBlob((byte) 1), 1L), is(equalTo(1L)));
-    assertThat(blob.position(createBlob((byte) 1, (byte) 2), 1L), is(equalTo(1L)));
-    assertThat(blob.position(createBlob((byte) 2), 1L), is(equalTo(2L)));
+    assertEquals(1L, blob.position(createBlob((byte) 1), 1L));
+    assertEquals(1L, blob.position(createBlob((byte) 1, (byte) 2), 1L));
+    assertEquals(2L, blob.position(createBlob((byte) 2), 1L));
     // note that the spec says that the method should return the position within the BLOB where the
     // pattern can be found, so it's not relative to the starting position.
-    assertThat(blob.position(createBlob((byte) 2), 2L), is(equalTo(2L)));
-    assertThat(blob.position(createBlob(new byte[] {1, 2, 3, 4, 5}), 1L), is(equalTo(1L)));
-    assertThat(blob.position(createBlob(new byte[] {1, 2, 3, 4, 5, 6}), 1L), is(equalTo(-1L)));
-    assertThat(blob.position(createBlob(new byte[] {1, 2, 3, 4, 5}), 2L), is(equalTo(-1L)));
-    assertThat(blob.position(createBlob(new byte[] {2}), 3L), is(equalTo(-1L)));
-    assertThat(blob.position(createBlob(new byte[] {1}), 6L), is(equalTo(-1L)));
+    assertEquals(2L, blob.position(createBlob((byte) 2), 2L));
+    assertEquals(1L, blob.position(createBlob(new byte[] {1, 2, 3, 4, 5}), 1L));
+    assertEquals(-1L, blob.position(createBlob(new byte[] {1, 2, 3, 4, 5, 6}), 1L));
+    assertEquals(-1L, blob.position(createBlob(new byte[] {1, 2, 3, 4, 5}), 2L));
+    assertEquals(-1L, blob.position(createBlob(new byte[] {2}), 3L));
+    assertEquals(-1L, blob.position(createBlob(new byte[] {1}), 6L));
 
     // test invalid parameters
     PosBytes[] params =
@@ -186,15 +179,11 @@ public class JdbcBlobTest {
           PosBytes.of(0L, new byte[] {}), PosBytes.of(-1L, new byte[] {}), PosBytes.of(1L, null)
         };
     for (PosBytes param : params) {
-      boolean exception = false;
-      try {
-        blob.position(createBlob(param.bytes), param.pos);
-      } catch (SQLException e) {
-        exception =
-            (e instanceof JdbcSqlException
-                && ((JdbcSqlException) e).getCode() == Code.INVALID_ARGUMENT);
-      }
-      assertThat(param.toString(), exception, is(true));
+      SQLException sqlException =
+          assertThrows(SQLException.class, () -> blob.position(createBlob(param.bytes), param.pos));
+      assertTrue(sqlException instanceof JdbcSqlException);
+      JdbcSqlException jdbcSqlException = (JdbcSqlException) sqlException;
+      assertEquals(Code.INVALID_ARGUMENT, jdbcSqlException.getCode());
     }
   }
 
@@ -211,35 +200,35 @@ public class JdbcBlobTest {
   public void testSetBytes() throws SQLException {
     JdbcBlob blob = new JdbcBlob();
     blob.setBytes(1L, new byte[] {1, 2, 3});
-    assertThat(blob.getBytes(1L, 10), is(equalTo(new byte[] {1, 2, 3})));
+    assertArrayEquals(new byte[] {1, 2, 3}, blob.getBytes(1L, 10));
     blob.setBytes(2L, new byte[] {1});
-    assertThat(blob.getBytes(1L, 10), is(equalTo(new byte[] {1, 1, 3})));
+    assertArrayEquals(new byte[] {1, 1, 3}, blob.getBytes(1L, 10));
     blob.setBytes(4L, new byte[] {4});
-    assertThat(blob.getBytes(1L, 10), is(equalTo(new byte[] {1, 1, 3, 4})));
+    assertArrayEquals(new byte[] {1, 1, 3, 4}, blob.getBytes(1L, 10));
     blob.setBytes(8L, new byte[] {8});
-    assertThat(blob.getBytes(1L, 10), is(equalTo(new byte[] {1, 1, 3, 4, 0, 0, 0, 8})));
+    assertArrayEquals(new byte[] {1, 1, 3, 4, 0, 0, 0, 8}, blob.getBytes(1L, 10));
   }
 
   @Test
   public void testSetBytesOffsetLength() throws SQLException {
     JdbcBlob blob = new JdbcBlob();
     blob.setBytes(4L, new byte[] {1, 2, 3}, 0, 3);
-    assertThat(blob.getBytes(1L, 10), is(equalTo(new byte[] {0, 0, 0, 1, 2, 3})));
+    assertArrayEquals(new byte[] {0, 0, 0, 1, 2, 3}, blob.getBytes(1L, 10));
     blob.free();
     blob.setBytes(4L, new byte[] {1, 2, 3}, 1, 3);
-    assertThat(blob.getBytes(1L, 10), is(equalTo(new byte[] {0, 0, 0, 2, 3})));
+    assertArrayEquals(new byte[] {0, 0, 0, 2, 3}, blob.getBytes(1L, 10));
     blob.free();
     blob.setBytes(4L, new byte[] {1, 2, 3}, 3, 3);
-    assertThat(blob.getBytes(1L, 10), is(equalTo(new byte[] {0, 0, 0})));
+    assertArrayEquals(new byte[] {0, 0, 0}, blob.getBytes(1L, 10));
     blob.free();
     blob.setBytes(4L, new byte[] {1, 2, 3}, 4, 3);
-    assertThat(blob.getBytes(1L, 10), is(equalTo(new byte[] {0, 0, 0})));
+    assertArrayEquals(new byte[] {0, 0, 0}, blob.getBytes(1L, 10));
     blob.setBytes(2L, new byte[] {1, 2, 3}, 0, 10);
-    assertThat(blob.getBytes(1L, 10), is(equalTo(new byte[] {0, 1, 2, 3})));
+    assertArrayEquals(new byte[] {0, 1, 2, 3}, blob.getBytes(1L, 10));
     blob.setBytes(3L, new byte[] {1, 2, 3}, 2, 10);
-    assertThat(blob.getBytes(1L, 10), is(equalTo(new byte[] {0, 1, 3, 3})));
+    assertArrayEquals(new byte[] {0, 1, 3, 3}, blob.getBytes(1L, 10));
     blob.setBytes(10L, new byte[] {1, 2, 3}, 2, 10);
-    assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {0, 1, 3, 3, 0, 0, 0, 0, 0, 3})));
+    assertArrayEquals(new byte[] {0, 1, 3, 3, 0, 0, 0, 0, 0, 3}, blob.getBytes(1L, 20));
   }
 
   @Test
@@ -249,51 +238,49 @@ public class JdbcBlobTest {
     try (OutputStream os = blob.setBinaryStream(1L)) {
       os.write(6);
       // no flush yet, so it should be unchanged
-      assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {1, 2, 3, 4, 5})));
+      assertArrayEquals(new byte[] {1, 2, 3, 4, 5}, blob.getBytes(1L, 20));
       os.flush();
-      assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {6, 2, 3, 4, 5})));
+      assertArrayEquals(new byte[] {6, 2, 3, 4, 5}, blob.getBytes(1L, 20));
       os.write(7);
     }
     // closing the stream should also flush the changes
-    assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {6, 7, 3, 4, 5})));
+    assertArrayEquals(new byte[] {6, 7, 3, 4, 5}, blob.getBytes(1L, 20));
 
     // test writing beyond the end of the stream
     try (OutputStream os = blob.setBinaryStream(1L)) {
       os.write(new byte[] {1, 2, 3, 4, 5, 6, 7});
       // no flush yet, so it should be unchanged
-      assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {6, 7, 3, 4, 5})));
+      assertArrayEquals(new byte[] {6, 7, 3, 4, 5}, blob.getBytes(1L, 20));
       os.flush();
-      assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {1, 2, 3, 4, 5, 6, 7})));
+      assertArrayEquals(new byte[] {1, 2, 3, 4, 5, 6, 7}, blob.getBytes(1L, 20));
     }
-    assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {1, 2, 3, 4, 5, 6, 7})));
+    assertArrayEquals(new byte[] {1, 2, 3, 4, 5, 6, 7}, blob.getBytes(1L, 20));
 
     // test writing from a position that is larger than 1
     try (OutputStream os = blob.setBinaryStream(5L)) {
       os.write(new byte[] {1, 2, 3});
       // no flush yet, so it should be unchanged
-      assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {1, 2, 3, 4, 5, 6, 7})));
+      assertArrayEquals(new byte[] {1, 2, 3, 4, 5, 6, 7}, blob.getBytes(1L, 20));
       os.flush();
-      assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {1, 2, 3, 4, 1, 2, 3})));
+      assertArrayEquals(new byte[] {1, 2, 3, 4, 1, 2, 3}, blob.getBytes(1L, 20));
     }
 
     // test writing from a position that is larger than the current length
     try (OutputStream os = blob.setBinaryStream(10L)) {
       os.write(new byte[] {1, 2, 3});
       // no flush yet, so it should be unchanged
-      assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {1, 2, 3, 4, 1, 2, 3})));
+      assertArrayEquals(new byte[] {1, 2, 3, 4, 1, 2, 3}, blob.getBytes(1L, 20));
       os.flush();
-      assertThat(
-          blob.getBytes(1L, 20), is(equalTo(new byte[] {1, 2, 3, 4, 1, 2, 3, 0, 0, 1, 2, 3})));
+      assertArrayEquals(new byte[] {1, 2, 3, 4, 1, 2, 3, 0, 0, 1, 2, 3}, blob.getBytes(1L, 20));
     }
 
     // test writing a large number of bytes
     try (OutputStream os = blob.setBinaryStream(1L)) {
       os.write(new byte[2000]);
       // no flush yet, so it should be unchanged
-      assertThat(
-          blob.getBytes(1L, 3000), is(equalTo(new byte[] {1, 2, 3, 4, 1, 2, 3, 0, 0, 1, 2, 3})));
+      assertArrayEquals(new byte[] {1, 2, 3, 4, 1, 2, 3, 0, 0, 1, 2, 3}, blob.getBytes(1L, 3000));
       os.flush();
-      assertThat(blob.getBytes(1L, 3000), is(equalTo(new byte[2000])));
+      assertArrayEquals(new byte[2000], blob.getBytes(1L, 3000));
     }
   }
 
@@ -301,20 +288,20 @@ public class JdbcBlobTest {
   public void testTruncate() throws SQLException {
     JdbcBlob blob = new JdbcBlob();
     blob.setBytes(1L, new byte[] {1, 2, 3, 4, 5});
-    assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {1, 2, 3, 4, 5})));
+    assertArrayEquals(new byte[] {1, 2, 3, 4, 5}, blob.getBytes(1L, 20));
     blob.truncate(3);
-    assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {1, 2, 3})));
+    assertArrayEquals(new byte[] {1, 2, 3}, blob.getBytes(1L, 20));
     blob.truncate(0);
-    assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {})));
+    assertArrayEquals(new byte[] {}, blob.getBytes(1L, 20));
   }
 
   @Test
   public void testFree() throws SQLException {
     JdbcBlob blob = new JdbcBlob();
     blob.setBytes(1L, new byte[] {1, 2, 3, 4, 5});
-    assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {1, 2, 3, 4, 5})));
+    assertArrayEquals(new byte[] {1, 2, 3, 4, 5}, blob.getBytes(1L, 20));
     blob.free();
-    assertThat(blob.getBytes(1L, 20), is(equalTo(new byte[] {})));
+    assertArrayEquals(new byte[] {}, blob.getBytes(1L, 20));
   }
 
   @Test
@@ -331,19 +318,19 @@ public class JdbcBlobTest {
         index++;
       }
     }
-    assertThat(buf, is(equalTo(new byte[] {1, 2, 3, 0, 0})));
+    assertArrayEquals(new byte[] {1, 2, 3, 0, 0}, buf);
 
     buf = new byte[10];
     try (InputStream is = blob.getBinaryStream(4L, 10)) {
-      assertThat(is.read(buf), is(equalTo(2)));
-      assertThat(is.read(), is(equalTo(-1)));
+      assertEquals(2, is.read(buf));
+      assertEquals(-1, is.read());
     }
-    assertThat(buf, is(equalTo(new byte[] {4, 5, 0, 0, 0, 0, 0, 0, 0, 0})));
+    assertArrayEquals(new byte[] {4, 5, 0, 0, 0, 0, 0, 0, 0, 0}, buf);
 
     buf = new byte[10];
     try (InputStream is = blob.getBinaryStream(6L, 10)) {
-      assertThat(is.read(buf), is(equalTo(-1)));
+      assertEquals(-1L, is.read(buf));
     }
-    assertThat(buf, is(equalTo(new byte[10])));
+    assertArrayEquals(new byte[10], buf);
   }
 }
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/JdbcClobTest.java b/src/test/java/com/google/cloud/spanner/jdbc/JdbcClobTest.java
index b195229..573200d 100644
--- a/src/test/java/com/google/cloud/spanner/jdbc/JdbcClobTest.java
+++ b/src/test/java/com/google/cloud/spanner/jdbc/JdbcClobTest.java
@@ -16,10 +16,10 @@
 
 package com.google.cloud.spanner.jdbc;
 
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThrows;
+import static org.junit.Assert.assertTrue;
 
 import com.google.rpc.Code;
 import java.io.IOException;
@@ -75,36 +75,32 @@ public class JdbcClobTest {
   public void testLength() throws SQLException {
     JdbcClob clob = new JdbcClob();
     clob.setString(1L, "test");
-    assertThat(clob.length(), is(equalTo(4L)));
+    assertEquals(4L, clob.length());
     clob.setString(1L, "test-test");
-    assertThat(clob.length(), is(equalTo(9L)));
+    assertEquals(9L, clob.length());
   }
 
   @Test
   public void testGetSubstring() throws SQLException {
     JdbcClob clob = new JdbcClob();
     clob.setString(1L, "test");
-    assertThat(clob.getSubString(1, 4), is(equalTo("test")));
-    assertThat(clob.getSubString(1, 2), is(equalTo("te")));
-    assertThat(clob.getSubString(3, 2), is(equalTo("st")));
-    assertThat(clob.getSubString(1, 5), is(equalTo("test")));
-    assertThat(clob.getSubString(4, 5), is(equalTo("t")));
-    assertThat(clob.getSubString(5, 5), is(equalTo("")));
-    assertThat(clob.getSubString(6, 5), is(equalTo("")));
+    assertEquals("test", clob.getSubString(1, 4));
+    assertEquals("te", clob.getSubString(1, 2));
+    assertEquals("st", clob.getSubString(3, 2));
+    assertEquals("test", clob.getSubString(1, 5));
+    assertEquals("t", clob.getSubString(4, 5));
+    assertEquals("", clob.getSubString(5, 5));
+    assertEquals("", clob.getSubString(6, 5));
 
     // test invalid parameters
     PosLength[] params =
         new PosLength[] {PosLength.of(0L, 4), PosLength.of(-1L, 4), PosLength.of(1L, -1)};
     for (PosLength param : params) {
-      boolean exception = false;
-      try {
-        clob.getSubString(param.pos, param.len);
-      } catch (SQLException e) {
-        exception =
-            (e instanceof JdbcSqlException
-                && ((JdbcSqlException) e).getCode() == Code.INVALID_ARGUMENT);
-      }
-      assertThat(param.toString(), exception, is(true));
+      SQLException sqlException =
+          assertThrows(SQLException.class, () -> clob.getSubString(param.pos, param.len));
+      assertTrue(sqlException instanceof JdbcSqlException);
+      JdbcSqlException jdbcSqlException = (JdbcSqlException) sqlException;
+      assertEquals(Code.INVALID_ARGUMENT, jdbcSqlException.getCode());
     }
   }
 
@@ -116,12 +112,12 @@ public class JdbcClobTest {
     try (Reader reader = clob.getCharacterStream()) {
       assertEquals(4, reader.read(cbuf, 0, 4));
     }
-    assertThat(cbuf, is(equalTo(new char[] {'t', 'e', 's', 't'})));
+    assertArrayEquals(new char[] {'t', 'e', 's', 't'}, cbuf);
     try (Reader reader = clob.getCharacterStream()) {
       assertEquals(2, reader.read(cbuf, 0, 2));
       assertEquals(2, reader.read(cbuf, 2, 2));
     }
-    assertThat(cbuf, is(equalTo(new char[] {'t', 'e', 's', 't'})));
+    assertArrayEquals(new char[] {'t', 'e', 's', 't'}, cbuf);
     try (Reader reader = clob.getCharacterStream()) {
       assertEquals(2, reader.read(cbuf, 0, 2));
       // changing the value of the clob will not change a character stream that has already been
@@ -129,36 +125,32 @@ public class JdbcClobTest {
       clob.setString(1L, "foobar");
       assertEquals(2, reader.read(cbuf, 2, 2));
     }
-    assertThat(cbuf, is(equalTo(new char[] {'t', 'e', 's', 't'})));
+    assertArrayEquals(new char[] {'t', 'e', 's', 't'}, cbuf);
   }
 
   @Test
   public void testPositionString() throws SQLException {
     JdbcClob clob = new JdbcClob();
     clob.setString(1L, "test");
-    assertThat(clob.position("st", 1L), is(equalTo(3L)));
+    assertEquals(3L, clob.position("st", 1L));
     clob.setString(1L, "foobarfoobar");
-    assertThat(clob.position("bar", 1L), is(equalTo(4L)));
-    assertThat(clob.position("bar", 2L), is(equalTo(4L)));
-    assertThat(clob.position("bar", 5L), is(equalTo(10L)));
-    assertThat(clob.position("bar", 8L), is(equalTo(10L)));
-    assertThat(clob.position("bar", 10L), is(equalTo(10L)));
-    assertThat(clob.position("bar", 11L), is(equalTo(-1L)));
-    assertThat(clob.position("bar", 100L), is(equalTo(-1L)));
-    assertThat(clob.position("not_there", 1L), is(equalTo(-1L)));
+    assertEquals(4L, clob.position("bar", 1L));
+    assertEquals(4L, clob.position("bar", 2L));
+    assertEquals(10L, clob.position("bar", 5L));
+    assertEquals(10L, clob.position("bar", 8L));
+    assertEquals(10L, clob.position("bar", 10L));
+    assertEquals(-1L, clob.position("bar", 11L));
+    assertEquals(-1L, clob.position("bar", 100L));
+    assertEquals(-1L, clob.position("not_there", 1L));
     // test invalid parameters
     PosString[] params =
         new PosString[] {PosString.of(0L, "bar"), PosString.of(-1L, "bar"), PosString.of(1L, null)};
     for (PosString param : params) {
-      boolean exception = false;
-      try {
-        clob.position(param.str, param.pos);
-      } catch (SQLException e) {
-        exception =
-            (e instanceof JdbcSqlException
-                && ((JdbcSqlException) e).getCode() == Code.INVALID_ARGUMENT);
-      }
-      assertThat(param.toString(), exception, is(true));
+      SQLException sqlException =
+          assertThrows(SQLException.class, () -> clob.position(param.str, param.pos));
+      assertTrue(sqlException instanceof JdbcSqlException);
+      JdbcSqlException jdbcSqlException = (JdbcSqlException) sqlException;
+      assertEquals(Code.INVALID_ARGUMENT, jdbcSqlException.getCode());
     }
   }
 
@@ -168,32 +160,32 @@ public class JdbcClobTest {
     clob.setString(1L, "test");
     JdbcClob search = new JdbcClob();
     search.setString(1L, "st");
-    assertThat(clob.position(search, 1L), is(equalTo(3L)));
+    assertEquals(3L, clob.position(search, 1L));
     clob.setString(1L, "foobarfoobar");
     search.setString(1L, "bar");
-    assertThat(clob.position(search, 1L), is(equalTo(4L)));
-    assertThat(clob.position(search, 2L), is(equalTo(4L)));
-    assertThat(clob.position(search, 5L), is(equalTo(10L)));
-    assertThat(clob.position(search, 8L), is(equalTo(10L)));
-    assertThat(clob.position(search, 10L), is(equalTo(10L)));
-    assertThat(clob.position(search, 11L), is(equalTo(-1L)));
-    assertThat(clob.position(search, 100L), is(equalTo(-1L)));
+    assertEquals(4L, clob.position(search, 1L));
+    assertEquals(4L, clob.position(search, 2L));
+    assertEquals(10L, clob.position(search, 5L));
+    assertEquals(10L, clob.position(search, 8L));
+    assertEquals(10L, clob.position(search, 10L));
+    assertEquals(-1L, clob.position(search, 11L));
+    assertEquals(-1L, clob.position(search, 100L));
     search.setString(1L, "not_there");
-    assertThat(clob.position(search, 1L), is(equalTo(-1L)));
+    assertEquals(-1L, clob.position(search, 1L));
     // test invalid parameters
     PosString[] params =
         new PosString[] {PosString.of(0L, "bar"), PosString.of(-1L, "bar"), PosString.of(1L, null)};
     for (PosString param : params) {
-      boolean exception = false;
-      try {
-        search.setString(1L, param.str);
-        clob.position(search, param.pos);
-      } catch (SQLException e) {
-        exception =
-            (e instanceof JdbcSqlException
-                && ((JdbcSqlException) e).getCode() == Code.INVALID_ARGUMENT);
-      }
-      assertThat(param.toString(), exception, is(true));
+      SQLException sqlException =
+          assertThrows(
+              SQLException.class,
+              () -> {
+                search.setString(1L, param.str);
+                clob.position(search, param.pos);
+              });
+      assertTrue(sqlException instanceof JdbcSqlException);
+      JdbcSqlException jdbcSqlException = (JdbcSqlException) sqlException;
+      assertEquals(Code.INVALID_ARGUMENT, jdbcSqlException.getCode());
     }
   }
 
@@ -201,30 +193,26 @@ public class JdbcClobTest {
   public void testSetString() throws SQLException {
     JdbcClob clob = new JdbcClob();
     clob.setString(1L, "test");
-    assertThat(clob.getSubString(1L, 4), is(equalTo("test")));
+    assertEquals("test", clob.getSubString(1L, 4));
     clob.setString(1L, "bar");
-    assertThat(clob.getSubString(1L, 4), is(equalTo("bart")));
+    assertEquals("bart", clob.getSubString(1L, 4));
     clob.setString(1L, "foobar");
-    assertThat(clob.getSubString(1L, 6), is(equalTo("foobar")));
+    assertEquals("foobar", clob.getSubString(1L, 6));
     clob.setString(2L, "foobar");
-    assertThat(clob.getSubString(1L, 7), is(equalTo("ffoobar")));
+    assertEquals("ffoobar", clob.getSubString(1L, 7));
     clob.setString(8L, "test");
-    assertThat(clob.getSubString(1L, 11), is(equalTo("ffoobartest")));
+    assertEquals("ffoobartest", clob.getSubString(1L, 11));
     clob.setString(15, "end");
-    assertThat(clob.getSubString(1L, 17), is(equalTo("ffoobartest   end")));
+    assertEquals("ffoobartest   end", clob.getSubString(1L, 17));
     // test invalid parameters
     PosString[] params =
         new PosString[] {PosString.of(0L, "bar"), PosString.of(-1L, "bar"), PosString.of(1L, null)};
     for (PosString param : params) {
-      boolean exception = false;
-      try {
-        clob.setString(param.pos, param.str);
-      } catch (SQLException e) {
-        exception =
-            (e instanceof JdbcSqlException
-                && ((JdbcSqlException) e).getCode() == Code.INVALID_ARGUMENT);
-      }
-      assertThat(param.toString(), exception, is(true));
+      SQLException sqlException =
+          assertThrows(SQLException.class, () -> clob.setString(param.pos, param.str));
+      assertTrue(sqlException instanceof JdbcSqlException);
+      JdbcSqlException jdbcSqlException = (JdbcSqlException) sqlException;
+      assertEquals(Code.INVALID_ARGUMENT, jdbcSqlException.getCode());
     }
   }
 
@@ -232,99 +220,99 @@ public class JdbcClobTest {
   public void testSetStringOffsetLen() throws SQLException {
     JdbcClob clob = new JdbcClob();
     clob.setString(1L, "test", 2, 3);
-    assertThat(clob.getSubString(1L, 4), is(equalTo("est")));
+    assertEquals("est", clob.getSubString(1L, 4));
     clob.setString(1L, "bar", 1, 1);
-    assertThat(clob.getSubString(1L, 4), is(equalTo("bst")));
+    assertEquals("bst", clob.getSubString(1L, 4));
     clob.setString(1L, "foobar", 1, 6);
-    assertThat(clob.getSubString(1L, 6), is(equalTo("foobar")));
+    assertEquals("foobar", clob.getSubString(1L, 6));
     clob.setString(2L, "foobar", 2, 5);
-    assertThat(clob.getSubString(1L, 7), is(equalTo("foobar")));
+    assertEquals("foobar", clob.getSubString(1L, 7));
     clob.setString(8L, "test", 4, 1);
-    assertThat(clob.getSubString(1L, 8), is(equalTo("foobar t")));
+    assertEquals("foobar t", clob.getSubString(1L, 8));
     clob.setString(15, "end", 1, 3);
-    assertThat(clob.getSubString(1L, 17), is(equalTo("foobar t      end")));
+    assertEquals("foobar t      end", clob.getSubString(1L, 17));
   }
 
   @Test
   public void testSetCharacterStream() throws SQLException, IOException {
     JdbcClob clob = new JdbcClob();
     clob.setString(1, "foobar");
-    assertThat(clob.getSubString(1L, 6), is(equalTo("foobar")));
+    assertEquals("foobar", clob.getSubString(1L, 6));
     try (Writer writer = clob.setCharacterStream(1L)) {
       writer.write("t");
       // not yet flushed, there should be no change
-      assertThat(clob.getSubString(1L, 6), is(equalTo("foobar")));
+      assertEquals("foobar", clob.getSubString(1L, 6));
       writer.flush();
       // after a flush the change should be visible
-      assertThat(clob.getSubString(1L, 6), is(equalTo("toobar")));
+      assertEquals("toobar", clob.getSubString(1L, 6));
       writer.write("est");
     }
-    // close should also autoflush
-    assertThat(clob.getSubString(1L, 6), is(equalTo("testar")));
+    // close should also auto-flush
+    assertEquals("testar", clob.getSubString(1L, 6));
 
     // start all over
     clob.free();
     clob.setString(1, "foobar");
-    assertThat(clob.getSubString(1L, 6), is(equalTo("foobar")));
+    assertEquals("foobar", clob.getSubString(1L, 6));
     try (Writer writer = clob.setCharacterStream(5L)) {
       writer.write("t");
       // not yet flushed, there should be no change
-      assertThat(clob.getSubString(1L, 6), is(equalTo("foobar")));
+      assertEquals("foobar", clob.getSubString(1L, 6));
       writer.flush();
       // after a flush the change should be visible
-      assertThat(clob.getSubString(1L, 6), is(equalTo("foobtr")));
+      assertEquals("foobtr", clob.getSubString(1L, 6));
       writer.write("est");
     }
-    // close should also autoflush
-    assertThat(clob.getSubString(1L, 8), is(equalTo("foobtest")));
+    // close should also auto-flush
+    assertEquals("foobtest", clob.getSubString(1L, 8));
 
     // do a test with multiple flushes
     clob.free();
     clob.setString(1, "foobar");
-    assertThat(clob.getSubString(1L, 6), is(equalTo("foobar")));
+    assertEquals("foobar", clob.getSubString(1L, 6));
     try (Writer writer = clob.setCharacterStream(1L)) {
       writer.write("t");
-      assertThat(clob.getSubString(1L, 6), is(equalTo("foobar")));
+      assertEquals("foobar", clob.getSubString(1L, 6));
       writer.flush();
-      assertThat(clob.getSubString(1L, 6), is(equalTo("toobar")));
+      assertEquals("toobar", clob.getSubString(1L, 6));
       writer.write("est");
-      assertThat(clob.getSubString(1L, 6), is(equalTo("toobar")));
+      assertEquals("toobar", clob.getSubString(1L, 6));
       writer.flush();
-      assertThat(clob.getSubString(1L, 6), is(equalTo("testar")));
+      assertEquals("testar", clob.getSubString(1L, 6));
     }
-    assertThat(clob.getSubString(1L, 8), is(equalTo("testar")));
+    assertEquals("testar", clob.getSubString(1L, 8));
 
     // writer after end
     clob.free();
     clob.setString(1, "foobar");
-    assertThat(clob.getSubString(1L, 10), is(equalTo("foobar")));
+    assertEquals("foobar", clob.getSubString(1L, 10));
     try (Writer writer = clob.setCharacterStream(10L)) {
       writer.write("t");
-      assertThat(clob.getSubString(1L, 20), is(equalTo("foobar")));
+      assertEquals("foobar", clob.getSubString(1L, 20));
       writer.flush();
-      assertThat(clob.getSubString(1L, 20), is(equalTo("foobar   t")));
+      assertEquals("foobar   t", clob.getSubString(1L, 20));
       writer.write("est");
     }
-    assertThat(clob.getSubString(1L, 20), is(equalTo("foobar   test")));
+    assertEquals("foobar   test", clob.getSubString(1L, 20));
   }
 
   @Test
   public void testTruncate() throws SQLException {
     JdbcClob clob = new JdbcClob();
     clob.setString(1L, "foobar");
-    assertThat(clob.getSubString(1L, 6), is(equalTo("foobar")));
+    assertEquals("foobar", clob.getSubString(1L, 6));
     clob.truncate(3L);
-    assertThat(clob.getSubString(1L, 6), is(equalTo("foo")));
+    assertEquals("foo", clob.getSubString(1L, 6));
     clob.truncate(0L);
-    assertThat(clob.getSubString(1L, 6), is(equalTo("")));
+    assertEquals("", clob.getSubString(1L, 6));
   }
 
   @Test
   public void testFree() throws SQLException {
     JdbcClob clob = new JdbcClob();
     clob.setString(1L, "foobar");
-    assertThat(clob.getSubString(1L, 6), is(equalTo("foobar")));
+    assertEquals("foobar", clob.getSubString(1L, 6));
     clob.free();
-    assertThat(clob.getSubString(1L, 6), is(equalTo("")));
+    assertEquals("", clob.getSubString(1L, 6));
   }
 }
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/JdbcConnectionTest.java b/src/test/java/com/google/cloud/spanner/jdbc/JdbcConnectionTest.java
index cda51a7..5a9618e 100644
--- a/src/test/java/com/google/cloud/spanner/jdbc/JdbcConnectionTest.java
+++ b/src/test/java/com/google/cloud/spanner/jdbc/JdbcConnectionTest.java
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertThrows;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -118,7 +117,7 @@ public class JdbcConnectionTest {
   }
 
   @Test
-  public void testReadOnly() {
+  public void testReadOnly() throws SQLException {
     ConnectionOptions options = mockOptions();
     when(options.isAutocommit()).thenReturn(true);
     when(options.isReadOnly()).thenReturn(true);
@@ -129,10 +128,9 @@ public class JdbcConnectionTest {
       // start a transaction
       connection.createStatement().execute("begin transaction");
       // setting readonly should no longer be allowed
-      connection.setReadOnly(true);
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(JdbcExceptionMatcher.matchCode(Code.FAILED_PRECONDITION).matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(JdbcSqlExceptionImpl.class, () -> connection.setReadOnly(true));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
     }
   }
 
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/JdbcDatabaseMetaDataTest.java b/src/test/java/com/google/cloud/spanner/jdbc/JdbcDatabaseMetaDataTest.java
index 1dc9565..3e94a4c 100644
--- a/src/test/java/com/google/cloud/spanner/jdbc/JdbcDatabaseMetaDataTest.java
+++ b/src/test/java/com/google/cloud/spanner/jdbc/JdbcDatabaseMetaDataTest.java
@@ -16,12 +16,9 @@
 
 package com.google.cloud.spanner.jdbc;
 
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -65,100 +62,97 @@ public class JdbcDatabaseMetaDataTest {
   public void testTrivialMethods() throws SQLException {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
-    assertThat(meta.allProceduresAreCallable(), is(true));
-    assertThat(meta.allTablesAreSelectable(), is(true));
-    assertThat(meta.autoCommitFailureClosesAllResultSets(), is(false));
-    assertThat(meta.dataDefinitionCausesTransactionCommit(), is(false));
-    assertThat(meta.dataDefinitionIgnoredInTransactions(), is(false));
+    assertTrue(meta.allProceduresAreCallable());
+    assertTrue(meta.allTablesAreSelectable());
+    assertFalse(meta.autoCommitFailureClosesAllResultSets());
+    assertFalse(meta.dataDefinitionCausesTransactionCommit());
+    assertFalse(meta.dataDefinitionIgnoredInTransactions());
     for (int type :
         new int[] {
           ResultSet.TYPE_FORWARD_ONLY,
           ResultSet.TYPE_SCROLL_INSENSITIVE,
           ResultSet.TYPE_SCROLL_SENSITIVE
         }) {
-      assertThat(meta.deletesAreDetected(type), is(false));
-      assertThat(meta.insertsAreDetected(type), is(false));
-      assertThat(meta.updatesAreDetected(type), is(false));
-      assertThat(meta.ownDeletesAreVisible(type), is(false));
-      assertThat(meta.ownInsertsAreVisible(type), is(false));
-      assertThat(meta.ownUpdatesAreVisible(type), is(false));
-      assertThat(meta.othersDeletesAreVisible(type), is(false));
-      assertThat(meta.othersInsertsAreVisible(type), is(false));
-      assertThat(meta.othersUpdatesAreVisible(type), is(false));
+      assertFalse(meta.deletesAreDetected(type));
+      assertFalse(meta.insertsAreDetected(type));
+      assertFalse(meta.updatesAreDetected(type));
+      assertFalse(meta.ownDeletesAreVisible(type));
+      assertFalse(meta.ownInsertsAreVisible(type));
+      assertFalse(meta.ownUpdatesAreVisible(type));
+      assertFalse(meta.othersDeletesAreVisible(type));
+      assertFalse(meta.othersInsertsAreVisible(type));
+      assertFalse(meta.othersUpdatesAreVisible(type));
     }
-    assertThat(meta.doesMaxRowSizeIncludeBlobs(), is(true));
-    assertThat(meta.generatedKeyAlwaysReturned(), is(false));
-    assertThat(meta.getCatalogSeparator(), is(equalTo(".")));
-    assertThat(meta.getCatalogTerm(), is(equalTo("CATALOG")));
-    assertThat(meta.getDatabaseMajorVersion(), is(equalTo(DATABASE_MAJOR_VERSION)));
-    assertThat(meta.getDatabaseMinorVersion(), is(equalTo(DATABASE_MINOR_VERSION)));
-    assertThat(meta.getDatabaseProductName(), is(equalTo(DATABASE_PRODUCT_NAME)));
-    assertThat(
-        meta.getDatabaseProductVersion(),
-        is(equalTo(DATABASE_MAJOR_VERSION + "." + DATABASE_MINOR_VERSION)));
-    assertThat(
-        meta.getDefaultTransactionIsolation(), is(equalTo(Connection.TRANSACTION_SERIALIZABLE)));
-    assertThat(meta.getDriverName(), is(equalTo("com.google.cloud.spanner.jdbc.JdbcDriver")));
-    assertThat(meta.getExtraNameCharacters(), is(equalTo("")));
-    assertThat(meta.getIdentifierQuoteString(), is(equalTo("`")));
-    assertThat(meta.getJDBCMajorVersion(), is(equalTo(4)));
-    assertThat(meta.getJDBCMinorVersion(), is(equalTo(1))); // Java 7 is JDBC 4.1
-    assertThat(meta.getMaxBinaryLiteralLength(), is(equalTo(0)));
-    assertThat(meta.getMaxCatalogNameLength(), is(equalTo(0)));
-    assertThat(meta.getMaxCharLiteralLength(), is(equalTo(0)));
-    assertThat(meta.getMaxColumnNameLength(), is(equalTo(128)));
-    assertThat(meta.getMaxColumnsInGroupBy(), is(equalTo(1000)));
-    assertThat(meta.getMaxColumnsInIndex(), is(equalTo(16)));
-    assertThat(meta.getMaxColumnsInOrderBy(), is(equalTo(0)));
-    assertThat(meta.getMaxColumnsInSelect(), is(equalTo(0)));
-    assertThat(meta.getMaxColumnsInTable(), is(equalTo(1024)));
-    assertThat(meta.getMaxConnections(), is(equalTo(0))); // there is a max number of sessions, but
-    // that is not the same as connections
-    assertThat(meta.getMaxCursorNameLength(), is(equalTo(0)));
-    assertThat(meta.getMaxIndexLength(), is(equalTo(8000)));
-    assertThat(meta.getMaxProcedureNameLength(), is(equalTo(0)));
-    assertThat(meta.getMaxRowSize(), is(equalTo(0)));
-    assertThat(meta.getMaxSchemaNameLength(), is(equalTo(0)));
-    assertThat(meta.getMaxStatementLength(), is(equalTo(1000000)));
-    assertThat(meta.getMaxStatements(), is(equalTo(0)));
-    assertThat(meta.getMaxTableNameLength(), is(equalTo(128)));
-    assertThat(meta.getMaxTablesInSelect(), is(equalTo(0)));
-    assertThat(meta.getMaxUserNameLength(), is(equalTo(0)));
-    assertThat(meta.getProcedureTerm(), is(equalTo("PROCEDURE")));
-    assertThat(meta.getResultSetHoldability(), is(equalTo(ResultSet.CLOSE_CURSORS_AT_COMMIT)));
-    assertThat(meta.getRowIdLifetime(), is(equalTo(RowIdLifetime.ROWID_UNSUPPORTED)));
-    assertThat(meta.getSchemaTerm(), is(equalTo("SCHEMA")));
-    assertThat(meta.getSearchStringEscape(), is(equalTo("\\")));
-    assertThat(meta.getSQLStateType(), is(equalTo(DatabaseMetaData.sqlStateSQL)));
-    assertThat(meta.locatorsUpdateCopy(), is(true));
-    assertThat(meta.nullsAreSortedHigh(), is(false));
-    assertThat(meta.nullsAreSortedLow(), is(true));
-    assertThat(meta.nullsAreSortedAtStart(), is(false));
-    assertThat(meta.nullsAreSortedAtEnd(), is(false));
-    assertThat(meta.nullPlusNonNullIsNull(), is(true));
-    assertThat(meta.isCatalogAtStart(), is(false));
-    assertThat(meta.isReadOnly(), is(equalTo(connection.isReadOnly())));
-    assertThat(meta.storesLowerCaseIdentifiers(), is(false));
-    assertThat(meta.storesLowerCaseQuotedIdentifiers(), is(false));
-    assertThat(meta.storesMixedCaseIdentifiers(), is(true));
-    assertThat(meta.storesMixedCaseQuotedIdentifiers(), is(true));
-    assertThat(meta.storesUpperCaseIdentifiers(), is(false));
-    assertThat(meta.storesUpperCaseQuotedIdentifiers(), is(false));
-    assertThat(meta.supportsAlterTableWithAddColumn(), is(true));
-    assertThat(meta.supportsAlterTableWithDropColumn(), is(true));
-    assertThat(meta.supportsANSI92EntryLevelSQL(), is(false));
-    assertThat(meta.supportsANSI92FullSQL(), is(false));
-    assertThat(meta.supportsANSI92IntermediateSQL(), is(false));
-    assertThat(meta.supportsBatchUpdates(), is(true));
-    assertThat(meta.supportsCatalogsInDataManipulation(), is(false));
-    assertThat(meta.supportsCatalogsInIndexDefinitions(), is(false));
-    assertThat(meta.supportsCatalogsInPrivilegeDefinitions(), is(false));
-    assertThat(meta.supportsCatalogsInProcedureCalls(), is(false));
-    assertThat(meta.supportsCatalogsInTableDefinitions(), is(false));
-    assertThat(meta.supportsColumnAliasing(), is(true));
+    assertTrue(meta.doesMaxRowSizeIncludeBlobs());
+    assertFalse(meta.generatedKeyAlwaysReturned());
+    assertEquals(".", meta.getCatalogSeparator());
+    assertEquals("CATALOG", meta.getCatalogTerm());
+    assertEquals(DATABASE_MAJOR_VERSION, meta.getDatabaseMajorVersion());
+    assertEquals(DATABASE_MINOR_VERSION, meta.getDatabaseMinorVersion());
+    assertEquals(DATABASE_PRODUCT_NAME, meta.getDatabaseProductName());
+    assertEquals(
+        DATABASE_MAJOR_VERSION + "." + DATABASE_MINOR_VERSION, meta.getDatabaseProductVersion());
+    assertEquals(Connection.TRANSACTION_SERIALIZABLE, meta.getDefaultTransactionIsolation());
+    assertEquals("com.google.cloud.spanner.jdbc.JdbcDriver", meta.getDriverName());
+    assertEquals("", meta.getExtraNameCharacters());
+    assertEquals("`", meta.getIdentifierQuoteString());
+    assertEquals(4, meta.getJDBCMajorVersion());
+    assertEquals(1, meta.getJDBCMinorVersion()); // Java 7 is JDBC 4.1
+    assertEquals(0, meta.getMaxBinaryLiteralLength());
+    assertEquals(0, meta.getMaxCatalogNameLength());
+    assertEquals(0, meta.getMaxCharLiteralLength());
+    assertEquals(128, meta.getMaxColumnNameLength());
+    assertEquals(1000, meta.getMaxColumnsInGroupBy());
+    assertEquals(16, meta.getMaxColumnsInIndex());
+    assertEquals(0, meta.getMaxColumnsInOrderBy());
+    assertEquals(0, meta.getMaxColumnsInSelect());
+    assertEquals(1024, meta.getMaxColumnsInTable());
+    assertEquals(0, meta.getMaxConnections());
+    assertEquals(0, meta.getMaxCursorNameLength());
+    assertEquals(8000, meta.getMaxIndexLength());
+    assertEquals(0, meta.getMaxProcedureNameLength());
+    assertEquals(0, meta.getMaxRowSize());
+    assertEquals(0, meta.getMaxSchemaNameLength());
+    assertEquals(1000000, meta.getMaxStatementLength());
+    assertEquals(0, meta.getMaxStatements());
+    assertEquals(128, meta.getMaxTableNameLength());
+    assertEquals(0, meta.getMaxTablesInSelect());
+    assertEquals(0, meta.getMaxUserNameLength());
+    assertEquals("PROCEDURE", meta.getProcedureTerm());
+    assertEquals(ResultSet.CLOSE_CURSORS_AT_COMMIT, meta.getResultSetHoldability());
+    assertEquals(RowIdLifetime.ROWID_UNSUPPORTED, meta.getRowIdLifetime());
+    assertEquals("SCHEMA", meta.getSchemaTerm());
+    assertEquals("\\", meta.getSearchStringEscape());
+    assertEquals(DatabaseMetaData.sqlStateSQL, meta.getSQLStateType());
+    assertTrue(meta.locatorsUpdateCopy());
+    assertFalse(meta.nullsAreSortedHigh());
+    assertTrue(meta.nullsAreSortedLow());
+    assertFalse(meta.nullsAreSortedAtStart());
+    assertFalse(meta.nullsAreSortedAtEnd());
+    assertTrue(meta.nullPlusNonNullIsNull());
+    assertFalse(meta.isCatalogAtStart());
+    assertEquals(connection.isReadOnly(), meta.isReadOnly());
+    assertFalse(meta.storesLowerCaseIdentifiers());
+    assertFalse(meta.storesLowerCaseQuotedIdentifiers());
+    assertTrue(meta.storesMixedCaseIdentifiers());
+    assertTrue(meta.storesMixedCaseQuotedIdentifiers());
+    assertFalse(meta.storesUpperCaseIdentifiers());
+    assertFalse(meta.storesUpperCaseQuotedIdentifiers());
+    assertTrue(meta.supportsAlterTableWithAddColumn());
+    assertTrue(meta.supportsAlterTableWithDropColumn());
+    assertFalse(meta.supportsANSI92EntryLevelSQL());
+    assertFalse(meta.supportsANSI92FullSQL());
+    assertFalse(meta.supportsANSI92IntermediateSQL());
+    assertTrue(meta.supportsBatchUpdates());
+    assertFalse(meta.supportsCatalogsInDataManipulation());
+    assertFalse(meta.supportsCatalogsInIndexDefinitions());
+    assertFalse(meta.supportsCatalogsInPrivilegeDefinitions());
+    assertFalse(meta.supportsCatalogsInProcedureCalls());
+    assertFalse(meta.supportsCatalogsInTableDefinitions());
+    assertTrue(meta.supportsColumnAliasing());
     // Note that the supportsConvert() method indicates whether the server side function CONVERT is
     // supported, not what the JDBC driver might be able to convert on the client side.
-    assertThat(meta.supportsConvert(), is(false));
+    assertFalse(meta.supportsConvert());
     int[] types =
         new int[] {
           Types.ARRAY,
@@ -201,77 +195,76 @@ public class JdbcDatabaseMetaDataTest {
         };
     for (int from : types) {
       for (int to : types) {
-        assertThat(meta.supportsConvert(from, to), is(false));
+        assertFalse(meta.supportsConvert(from, to));
       }
     }
-    assertThat(meta.supportsCoreSQLGrammar(), is(false));
-    assertThat(meta.supportsCorrelatedSubqueries(), is(true));
-    assertThat(meta.supportsDataDefinitionAndDataManipulationTransactions(), is(false));
-    assertThat(meta.supportsDataManipulationTransactionsOnly(), is(true));
-    assertThat(meta.supportsDifferentTableCorrelationNames(), is(false));
-    assertThat(meta.supportsExpressionsInOrderBy(), is(true));
-    assertThat(meta.supportsExtendedSQLGrammar(), is(false));
-    assertThat(meta.supportsFullOuterJoins(), is(true));
-    assertThat(meta.supportsGetGeneratedKeys(), is(false));
-    assertThat(meta.supportsGroupBy(), is(true));
-    assertThat(meta.supportsGroupByBeyondSelect(), is(true));
-    assertThat(meta.supportsGroupByUnrelated(), is(true));
-    assertThat(meta.supportsIntegrityEnhancementFacility(), is(false));
-    assertThat(meta.supportsLikeEscapeClause(), is(true));
-    assertThat(meta.supportsLimitedOuterJoins(), is(true));
-    assertThat(meta.supportsMinimumSQLGrammar(), is(false));
-    assertThat(meta.supportsMixedCaseIdentifiers(), is(false));
-    assertThat(meta.supportsMixedCaseQuotedIdentifiers(), is(false));
-    assertThat(meta.supportsMultipleOpenResults(), is(true));
-    assertThat(meta.supportsMultipleResultSets(), is(true));
-    assertThat(meta.supportsMultipleTransactions(), is(true));
-    assertThat(meta.supportsNamedParameters(), is(false));
-    assertThat(meta.supportsNonNullableColumns(), is(true));
-    assertThat(meta.supportsOpenCursorsAcrossCommit(), is(false));
-    assertThat(meta.supportsOpenCursorsAcrossRollback(), is(false));
-    assertThat(meta.supportsOpenStatementsAcrossCommit(), is(true));
-    assertThat(meta.supportsOpenStatementsAcrossRollback(), is(true));
-    assertThat(meta.supportsOrderByUnrelated(), is(true));
-    assertThat(meta.supportsOuterJoins(), is(true));
-    assertThat(meta.supportsPositionedDelete(), is(false));
-    assertThat(meta.supportsPositionedUpdate(), is(false));
+    assertFalse(meta.supportsCoreSQLGrammar());
+    assertTrue(meta.supportsCorrelatedSubqueries());
+    assertFalse(meta.supportsDataDefinitionAndDataManipulationTransactions());
+    assertTrue(meta.supportsDataManipulationTransactionsOnly());
+    assertFalse(meta.supportsDifferentTableCorrelationNames());
+    assertTrue(meta.supportsExpressionsInOrderBy());
+    assertFalse(meta.supportsExtendedSQLGrammar());
+    assertTrue(meta.supportsFullOuterJoins());
+    assertFalse(meta.supportsGetGeneratedKeys());
+    assertTrue(meta.supportsGroupBy());
+    assertTrue(meta.supportsGroupByBeyondSelect());
+    assertTrue(meta.supportsGroupByUnrelated());
+    assertFalse(meta.supportsIntegrityEnhancementFacility());
+    assertTrue(meta.supportsLikeEscapeClause());
+    assertTrue(meta.supportsLimitedOuterJoins());
+    assertFalse(meta.supportsMinimumSQLGrammar());
+    assertFalse(meta.supportsMixedCaseIdentifiers());
+    assertFalse(meta.supportsMixedCaseQuotedIdentifiers());
+    assertTrue(meta.supportsMultipleOpenResults());
+    assertTrue(meta.supportsMultipleResultSets());
+    assertTrue(meta.supportsMultipleTransactions());
+    assertFalse(meta.supportsNamedParameters());
+    assertTrue(meta.supportsNonNullableColumns());
+    assertFalse(meta.supportsOpenCursorsAcrossCommit());
+    assertFalse(meta.supportsOpenCursorsAcrossRollback());
+    assertTrue(meta.supportsOpenStatementsAcrossCommit());
+    assertTrue(meta.supportsOpenStatementsAcrossRollback());
+    assertTrue(meta.supportsOrderByUnrelated());
+    assertTrue(meta.supportsOuterJoins());
+    assertFalse(meta.supportsPositionedDelete());
+    assertFalse(meta.supportsPositionedUpdate());
     for (int type :
         new int[] {
           ResultSet.TYPE_FORWARD_ONLY,
           ResultSet.TYPE_SCROLL_INSENSITIVE,
           ResultSet.TYPE_SCROLL_SENSITIVE
         }) {
-      assertThat(meta.supportsResultSetType(type), is(type == ResultSet.TYPE_FORWARD_ONLY));
+      assertEquals(type == ResultSet.TYPE_FORWARD_ONLY, meta.supportsResultSetType(type));
       for (int concur : new int[] {ResultSet.CONCUR_READ_ONLY, ResultSet.CONCUR_UPDATABLE}) {
-        assertThat(
-            meta.supportsResultSetConcurrency(type, concur),
-            is(type == ResultSet.TYPE_FORWARD_ONLY && concur == ResultSet.CONCUR_READ_ONLY));
+        assertEquals(
+            type == ResultSet.TYPE_FORWARD_ONLY && concur == ResultSet.CONCUR_READ_ONLY,
+            meta.supportsResultSetConcurrency(type, concur));
       }
     }
-    assertThat(meta.supportsResultSetHoldability(ResultSet.CLOSE_CURSORS_AT_COMMIT), is(true));
-    assertThat(meta.supportsResultSetHoldability(ResultSet.HOLD_CURSORS_OVER_COMMIT), is(false));
-    assertThat(meta.supportsSavepoints(), is(false));
-    assertThat(meta.supportsSchemasInDataManipulation(), is(false));
-    assertThat(meta.supportsSchemasInIndexDefinitions(), is(false));
-    assertThat(meta.supportsSchemasInPrivilegeDefinitions(), is(false));
-    assertThat(meta.supportsSchemasInProcedureCalls(), is(false));
-    assertThat(meta.supportsSchemasInTableDefinitions(), is(false));
-    assertThat(meta.supportsSelectForUpdate(), is(false));
-    assertThat(meta.supportsStatementPooling(), is(false));
-    assertThat(meta.supportsStoredFunctionsUsingCallSyntax(), is(false));
-    assertThat(meta.supportsStoredProcedures(), is(false));
-    assertThat(meta.supportsSubqueriesInComparisons(), is(true));
-    assertThat(meta.supportsSubqueriesInExists(), is(true));
-    assertThat(meta.supportsSubqueriesInIns(), is(true));
-    assertThat(meta.supportsSubqueriesInQuantifieds(), is(true));
-    assertThat(meta.supportsTableCorrelationNames(), is(true));
-    assertThat(meta.supportsTransactions(), is(true));
-    assertThat(meta.supportsUnion(), is(true));
-    assertThat(meta.supportsUnionAll(), is(true));
-    assertThat(meta.usesLocalFiles(), is(false));
-    assertThat(meta.usesLocalFilePerTable(), is(false));
-    assertThat(
-        meta.supportsTransactionIsolationLevel(Connection.TRANSACTION_SERIALIZABLE), is(true));
+    assertTrue(meta.supportsResultSetHoldability(ResultSet.CLOSE_CURSORS_AT_COMMIT));
+    assertFalse(meta.supportsResultSetHoldability(ResultSet.HOLD_CURSORS_OVER_COMMIT));
+    assertFalse(meta.supportsSavepoints());
+    assertFalse(meta.supportsSchemasInDataManipulation());
+    assertFalse(meta.supportsSchemasInIndexDefinitions());
+    assertFalse(meta.supportsSchemasInPrivilegeDefinitions());
+    assertFalse(meta.supportsSchemasInProcedureCalls());
+    assertFalse(meta.supportsSchemasInTableDefinitions());
+    assertFalse(meta.supportsSelectForUpdate());
+    assertFalse(meta.supportsStatementPooling());
+    assertFalse(meta.supportsStoredFunctionsUsingCallSyntax());
+    assertFalse(meta.supportsStoredProcedures());
+    assertTrue(meta.supportsSubqueriesInComparisons());
+    assertTrue(meta.supportsSubqueriesInExists());
+    assertTrue(meta.supportsSubqueriesInIns());
+    assertTrue(meta.supportsSubqueriesInQuantifieds());
+    assertTrue(meta.supportsTableCorrelationNames());
+    assertTrue(meta.supportsTransactions());
+    assertTrue(meta.supportsUnion());
+    assertTrue(meta.supportsUnionAll());
+    assertFalse(meta.usesLocalFiles());
+    assertFalse(meta.usesLocalFilePerTable());
+    assertTrue(meta.supportsTransactionIsolationLevel(Connection.TRANSACTION_SERIALIZABLE));
     for (int level :
         new int[] {
           Connection.TRANSACTION_NONE,
@@ -279,17 +272,17 @@ public class JdbcDatabaseMetaDataTest {
           Connection.TRANSACTION_READ_UNCOMMITTED,
           Connection.TRANSACTION_REPEATABLE_READ
         }) {
-      assertThat(meta.supportsTransactionIsolationLevel(level), is(false));
+      assertFalse(meta.supportsTransactionIsolationLevel(level));
     }
     assertEquals(10485760L, meta.getMaxLogicalLobSize());
     assertFalse(meta.supportsRefCursors());
 
     // trivial tests that guarantee that the function works, but the return value doesn't matter
-    assertThat(meta.getNumericFunctions(), is(notNullValue()));
-    assertThat(meta.getSQLKeywords(), is(notNullValue()));
-    assertThat(meta.getStringFunctions(), is(notNullValue()));
-    assertThat(meta.getSystemFunctions(), is(notNullValue()));
-    assertThat(meta.getTimeDateFunctions(), is(notNullValue()));
+    assertNotNull(meta.getNumericFunctions());
+    assertNotNull(meta.getSQLKeywords());
+    assertNotNull(meta.getStringFunctions());
+    assertNotNull(meta.getSystemFunctions());
+    assertNotNull(meta.getTimeDateFunctions());
   }
 
   @Test
@@ -297,9 +290,9 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getAttributes(DEFAULT_CATALOG, DEFAULT_SCHEMA, TEST_TABLE, null)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(21)));
+      assertEquals(21, rsmd.getColumnCount());
     }
   }
 
@@ -314,9 +307,9 @@ public class JdbcDatabaseMetaDataTest {
             TEST_TABLE,
             DatabaseMetaData.bestRowTransaction,
             false)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(8)));
+      assertEquals(8, rsmd.getColumnCount());
     }
   }
 
@@ -327,11 +320,11 @@ public class JdbcDatabaseMetaDataTest {
     when(connection.getCatalog()).thenCallRealMethod();
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getCatalogs()) {
-      assertThat(rs.next(), is(true));
-      assertThat(rs.getString("TABLE_CAT"), is(equalTo(connection.getDefaultCatalog())));
-      assertThat(rs.next(), is(false));
+      assertTrue(rs.next());
+      assertEquals(connection.getDefaultCatalog(), rs.getString("TABLE_CAT"));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(1)));
+      assertEquals(1, rsmd.getColumnCount());
     }
   }
 
@@ -340,21 +333,21 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getClientInfoProperties()) {
-      assertThat(rs.next(), is(true));
-      assertThat(rs.getString("NAME"), is(equalTo("APPLICATIONNAME")));
-      assertThat(rs.getString("DEFAULT_VALUE"), is(equalTo("")));
+      assertTrue(rs.next());
+      assertEquals("APPLICATIONNAME", rs.getString("NAME"));
+      assertEquals("", rs.getString("DEFAULT_VALUE"));
 
-      assertThat(rs.next(), is(true));
-      assertThat(rs.getString("NAME"), is(equalTo("CLIENTHOSTNAME")));
-      assertThat(rs.getString("DEFAULT_VALUE"), is(equalTo("")));
+      assertTrue(rs.next());
+      assertEquals("CLIENTHOSTNAME", rs.getString("NAME"));
+      assertEquals("", rs.getString("DEFAULT_VALUE"));
 
-      assertThat(rs.next(), is(true));
-      assertThat(rs.getString("NAME"), is(equalTo("CLIENTUSER")));
-      assertThat(rs.getString("DEFAULT_VALUE"), is(equalTo("")));
+      assertTrue(rs.next());
+      assertEquals("CLIENTUSER", rs.getString("NAME"));
+      assertEquals("", rs.getString("DEFAULT_VALUE"));
 
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(4)));
+      assertEquals(4, rsmd.getColumnCount());
     }
   }
 
@@ -364,9 +357,9 @@ public class JdbcDatabaseMetaDataTest {
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs =
         meta.getColumnPrivileges(DEFAULT_CATALOG, DEFAULT_SCHEMA, TEST_TABLE, null)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(8)));
+      assertEquals(8, rsmd.getColumnCount());
     }
   }
 
@@ -375,9 +368,9 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getFunctionColumns(DEFAULT_CATALOG, DEFAULT_SCHEMA, null, null)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(17)));
+      assertEquals(17, rsmd.getColumnCount());
     }
   }
 
@@ -386,9 +379,9 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getFunctions(DEFAULT_CATALOG, DEFAULT_SCHEMA, null)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(6)));
+      assertEquals(6, rsmd.getColumnCount());
     }
   }
 
@@ -397,9 +390,9 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getProcedureColumns(DEFAULT_CATALOG, DEFAULT_SCHEMA, null, null)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(20)));
+      assertEquals(20, rsmd.getColumnCount());
     }
   }
 
@@ -408,9 +401,9 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getProcedures(DEFAULT_CATALOG, DEFAULT_SCHEMA, null)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(9)));
+      assertEquals(9, rsmd.getColumnCount());
     }
   }
 
@@ -419,9 +412,9 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getPseudoColumns(DEFAULT_CATALOG, DEFAULT_SCHEMA, TEST_TABLE, null)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(12)));
+      assertEquals(12, rsmd.getColumnCount());
     }
   }
 
@@ -430,9 +423,9 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getSuperTables(DEFAULT_CATALOG, DEFAULT_SCHEMA, TEST_TABLE)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(4)));
+      assertEquals(4, rsmd.getColumnCount());
     }
   }
 
@@ -441,9 +434,9 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getSuperTypes(DEFAULT_CATALOG, DEFAULT_SCHEMA, null)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(6)));
+      assertEquals(6, rsmd.getColumnCount());
     }
   }
 
@@ -452,9 +445,9 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getTablePrivileges(DEFAULT_CATALOG, DEFAULT_SCHEMA, TEST_TABLE)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(7)));
+      assertEquals(7, rsmd.getColumnCount());
     }
   }
 
@@ -463,13 +456,13 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getTableTypes()) {
-      assertThat(rs.next(), is(true));
-      assertThat(rs.getString("TABLE_TYPE"), is(equalTo("TABLE")));
-      assertThat(rs.next(), is(true));
-      assertThat(rs.getString("TABLE_TYPE"), is(equalTo("VIEW")));
-      assertThat(rs.next(), is(false));
+      assertTrue(rs.next());
+      assertEquals("TABLE", rs.getString("TABLE_TYPE"));
+      assertTrue(rs.next());
+      assertEquals("VIEW", rs.getString("TABLE_TYPE"));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(1)));
+      assertEquals(1, rsmd.getColumnCount());
     }
   }
 
@@ -500,9 +493,9 @@ public class JdbcDatabaseMetaDataTest {
         assertEquals("NUMERIC", rs.getString("TYPE_NAME"));
         assertTrue(rs.next());
         assertEquals(dialect == Dialect.POSTGRESQL ? "JSONB" : "JSON", rs.getString("TYPE_NAME"));
-        assertThat(rs.next(), is(false));
+        assertFalse(rs.next());
         ResultSetMetaData rsmd = rs.getMetaData();
-        assertThat(rsmd.getColumnCount(), is(equalTo(18)));
+        assertEquals(18, rsmd.getColumnCount());
       }
     }
   }
@@ -512,9 +505,9 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getUDTs(DEFAULT_CATALOG, DEFAULT_SCHEMA, null, null)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(7)));
+      assertEquals(7, rsmd.getColumnCount());
     }
   }
 
@@ -523,9 +516,9 @@ public class JdbcDatabaseMetaDataTest {
     JdbcConnection connection = mock(JdbcConnection.class);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
     try (ResultSet rs = meta.getVersionColumns(DEFAULT_CATALOG, DEFAULT_SCHEMA, TEST_TABLE)) {
-      assertThat(rs.next(), is(false));
+      assertFalse(rs.next());
       ResultSetMetaData rsmd = rs.getMetaData();
-      assertThat(rsmd.getColumnCount(), is(equalTo(8)));
+      assertEquals(8, rsmd.getColumnCount());
     }
   }
 
@@ -540,6 +533,6 @@ public class JdbcDatabaseMetaDataTest {
     when(options.getCredentials()).thenReturn(credentials);
     when(connection.getConnectionOptions()).thenReturn(options);
     DatabaseMetaData meta = new JdbcDatabaseMetaData(connection);
-    assertThat(meta.getUserName(), is(equalTo("test@test-project.iam.gserviceaccount.com")));
+    assertEquals("test@test-project.iam.gserviceaccount.com", meta.getUserName());
   }
 }
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/JdbcExceptionMatcher.java b/src/test/java/com/google/cloud/spanner/jdbc/JdbcExceptionMatcher.java
deleted file mode 100644
index afe9657..0000000
--- a/src/test/java/com/google/cloud/spanner/jdbc/JdbcExceptionMatcher.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * 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.google.cloud.spanner.jdbc;
-
-import com.google.common.base.Preconditions;
-import com.google.rpc.Code;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
-
-public final class JdbcExceptionMatcher extends BaseMatcher<JdbcSqlException> {
-  private final Code errorCode;
-  private final String message;
-
-  public static JdbcExceptionMatcher matchCode(Code errorCode) {
-    Preconditions.checkNotNull(errorCode);
-    return new JdbcExceptionMatcher(errorCode, null);
-  }
-
-  public static JdbcExceptionMatcher matchCodeAndMessage(Code errorCode, String message) {
-    Preconditions.checkNotNull(errorCode);
-    Preconditions.checkNotNull(message);
-    return new JdbcExceptionMatcher(errorCode, message);
-  }
-
-  private JdbcExceptionMatcher(Code errorCode, String message) {
-    this.errorCode = errorCode;
-    this.message = message;
-  }
-
-  @Override
-  public boolean matches(Object item) {
-    if (item instanceof JdbcSqlException) {
-      JdbcSqlException exception = (JdbcSqlException) item;
-      if (message == null) {
-        return exception.getCode().equals(errorCode);
-      }
-      return exception.getCode().equals(errorCode)
-          && exception.getMessage().equals(errorCode.name() + ": " + message);
-    }
-    return false;
-  }
-
-  @Override
-  public void describeTo(Description description) {
-    description.appendText(JdbcSqlException.class.getName() + " with code " + errorCode.name());
-    if (message != null) {
-      description.appendText(" - " + JdbcSqlException.class.getName() + " with message " + message);
-    }
-  }
-}
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/JdbcGrpcErrorTest.java b/src/test/java/com/google/cloud/spanner/jdbc/JdbcGrpcErrorTest.java
index 2c1bfe8..ba94647 100644
--- a/src/test/java/com/google/cloud/spanner/jdbc/JdbcGrpcErrorTest.java
+++ b/src/test/java/com/google/cloud/spanner/jdbc/JdbcGrpcErrorTest.java
@@ -16,8 +16,9 @@
 
 package com.google.cloud.spanner.jdbc;
 
-import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThrows;
+import static org.junit.Assert.assertTrue;
 
 import com.google.cloud.spanner.ErrorCode;
 import com.google.cloud.spanner.MockSpannerServiceImpl;
@@ -87,9 +88,6 @@ public class JdbcGrpcErrorTest {
   // FAILED_PRECONDITION is chosen as the test error code as it should never be retryable.
   private final Exception serverException =
       Status.FAILED_PRECONDITION.withDescription("test exception").asRuntimeException();
-  private final SpannerJdbcExceptionMatcher<JdbcSqlExceptionImpl> testExceptionMatcher =
-      SpannerJdbcExceptionMatcher.matchCodeAndMessage(
-          JdbcSqlExceptionImpl.class, Code.FAILED_PRECONDITION, "test exception");
 
   @BeforeClass
   public static void startStaticServer() throws IOException {
@@ -152,69 +150,79 @@ public class JdbcGrpcErrorTest {
   }
 
   @Test
-  public void autocommitBeginTransaction() {
+  public void autocommitBeginTransaction() throws SQLException {
     mockSpanner.setBeginTransactionExecutionTime(
         SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
       // This triggers a retry with an explicit BeginTransaction RPC.
       mockSpanner.abortNextStatement();
-      connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql());
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
   @Test
-  public void autocommitBeginPDMLTransaction() {
+  public void autocommitBeginPDMLTransaction() throws SQLException {
     mockSpanner.setBeginTransactionExecutionTime(
         SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
       connection.createStatement().execute("SET AUTOCOMMIT_DML_MODE='PARTITIONED_NON_ATOMIC'");
-      connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql());
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
   @Test
-  public void transactionalBeginTransaction() {
+  public void transactionalBeginTransaction() throws SQLException {
     mockSpanner.setBeginTransactionExecutionTime(
         SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
       connection.setAutoCommit(false);
       // This triggers a retry with an explicit BeginTransaction RPC.
       mockSpanner.abortNextStatement();
-      connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql());
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
   @Test
-  public void readOnlyBeginTransaction() {
+  public void readOnlyBeginTransaction() throws SQLException {
     mockSpanner.setBeginTransactionExecutionTime(
         SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
       connection.setAutoCommit(false);
       connection.setReadOnly(true);
-      connection.createStatement().executeQuery(SELECT1.getSql());
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeQuery(SELECT1.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
   @Test
-  public void autocommitExecuteSql() {
+  public void autocommitExecuteSql() throws SQLException {
     mockSpanner.setExecuteSqlExecutionTime(SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
-      connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql());
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
@@ -230,22 +238,26 @@ public class JdbcGrpcErrorTest {
         SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
       connection.createStatement().execute("SET AUTOCOMMIT_DML_MODE='PARTITIONED_NON_ATOMIC'");
-      connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql());
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
   @Test
-  public void transactionalExecuteSql() {
+  public void transactionalExecuteSql() throws SQLException {
     mockSpanner.setExecuteSqlExecutionTime(SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
       connection.setAutoCommit(false);
-      connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql());
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
@@ -257,10 +269,10 @@ public class JdbcGrpcErrorTest {
       try (java.sql.Statement statement = connection.createStatement()) {
         statement.addBatch(UPDATE_STATEMENT.getSql());
         statement.addBatch(UPDATE_STATEMENT.getSql());
-        statement.executeBatch();
-        fail("missing expected exception");
-      } catch (SQLException e) {
-        assertThat(testExceptionMatcher.matches(e)).isTrue();
+        JdbcSqlExceptionImpl sqlException =
+            assertThrows(JdbcSqlExceptionImpl.class, statement::executeBatch);
+        assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+        assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
       }
     }
   }
@@ -274,52 +286,53 @@ public class JdbcGrpcErrorTest {
       try (java.sql.Statement statement = connection.createStatement()) {
         statement.addBatch(UPDATE_STATEMENT.getSql());
         statement.addBatch(UPDATE_STATEMENT.getSql());
-        statement.executeBatch();
-        fail("missing expected exception");
-      } catch (SQLException e) {
-        assertThat(testExceptionMatcher.matches(e)).isTrue();
+        JdbcSqlExceptionImpl sqlException =
+            assertThrows(JdbcSqlExceptionImpl.class, statement::executeBatch);
+        assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+        assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
       }
     }
   }
 
   @Test
-  public void autocommitCommit() {
+  public void autocommitCommit() throws SQLException {
     mockSpanner.setCommitExecutionTime(SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
-      connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql());
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
   @Test
-  public void transactionalCommit() {
+  public void transactionalCommit() throws SQLException {
     mockSpanner.setCommitExecutionTime(SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
       connection.setAutoCommit(false);
       connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql());
-      connection.commit();
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(JdbcSqlExceptionImpl.class, connection::commit);
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
   @Test
-  public void autocommitRollback() {
+  public void autocommitRollback() throws SQLException {
     // The JDBC driver should throw the exception of the SQL statement and ignore any errors from
     // the rollback() method.
     mockSpanner.setRollbackExecutionTime(SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
-      connection.createStatement().executeUpdate(INVALID_UPDATE_STATEMENT.getSql());
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(
-              SpannerJdbcExceptionMatcher.matchCodeAndMessage(
-                      JdbcSqlExceptionImpl.class, Code.NOT_FOUND, "Unknown table name")
-                  .matches(e))
-          .isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeUpdate(INVALID_UPDATE_STATEMENT.getSql()));
+      assertEquals(Code.NOT_FOUND, sqlException.getCode());
+      assertTrue(
+          sqlException.getMessage(), sqlException.getMessage().contains("Unknown table name"));
     }
   }
 
@@ -346,82 +359,88 @@ public class JdbcGrpcErrorTest {
     mockSpanner.setExecuteStreamingSqlExecutionTime(
         SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
-      try (java.sql.ResultSet rs = connection.createStatement().executeQuery(SELECT1.getSql())) {
-        rs.next();
-        fail("missing expected exception");
-      }
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeQuery(SELECT1.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
   @Test
-  public void transactionalExecuteStreamingSql() {
+  public void transactionalExecuteStreamingSql() throws SQLException {
     mockSpanner.setExecuteStreamingSqlExecutionTime(
         SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
       connection.setAutoCommit(false);
-      try (java.sql.ResultSet rs = connection.createStatement().executeQuery(SELECT1.getSql())) {
-        rs.next();
-        fail("missing expected exception");
-      }
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeQuery(SELECT1.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
   @Test
-  public void readOnlyExecuteStreamingSql() {
+  public void readOnlyExecuteStreamingSql() throws SQLException {
     mockSpanner.setExecuteStreamingSqlExecutionTime(
         SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
       connection.setAutoCommit(false);
       connection.setReadOnly(true);
-      try (java.sql.ResultSet rs = connection.createStatement().executeQuery(SELECT1.getSql())) {
-        rs.next();
-        fail("missing expected exception");
-      }
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeQuery(SELECT1.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
   @Test
-  public void autocommitCreateSession() {
+  public void autocommitCreateSession() throws SQLException {
     mockSpanner.setBatchCreateSessionsExecutionTime(
         SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
-      connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql());
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
   @Test
-  public void transactionalCreateSession() {
+  public void transactionalCreateSession() throws SQLException {
     mockSpanner.setBatchCreateSessionsExecutionTime(
         SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
       connection.setAutoCommit(false);
-      connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql());
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeUpdate(UPDATE_STATEMENT.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 
   @Test
-  public void readOnlyCreateSession() {
+  public void readOnlyCreateSession() throws SQLException {
     mockSpanner.setBatchCreateSessionsExecutionTime(
         SimulatedExecutionTime.ofException(serverException));
     try (java.sql.Connection connection = createConnection()) {
       connection.setAutoCommit(false);
       connection.setReadOnly(true);
-      connection.createStatement().executeQuery(SELECT1.getSql());
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(testExceptionMatcher.matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> connection.createStatement().executeQuery(SELECT1.getSql()));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("test exception"));
     }
   }
 }
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/JdbcResultSetTest.java b/src/test/java/com/google/cloud/spanner/jdbc/JdbcResultSetTest.java
index 08bc7e0..67b0cfd 100644
--- a/src/test/java/com/google/cloud/spanner/jdbc/JdbcResultSetTest.java
+++ b/src/test/java/com/google/cloud/spanner/jdbc/JdbcResultSetTest.java
@@ -16,12 +16,12 @@
 
 package com.google.cloud.spanner.jdbc;
 
-import static com.google.common.truth.Truth.assertThat;
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThrows;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
@@ -497,18 +497,14 @@ public class JdbcResultSetTest {
 
   @Test
   public void testGetURLIndexInvalid() throws SQLException {
-    try {
-      subject.getURL(STRING_COLINDEX_NOTNULL);
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(
-              SpannerJdbcExceptionMatcher.matchCodeAndMessage(
-                      JdbcSqlExceptionImpl.class,
-                      Code.INVALID_ARGUMENT,
-                      "Invalid URL: " + subject.getString(STRING_COLINDEX_NOTNULL))
-                  .matches(e))
-          .isTrue();
-    }
+    JdbcSqlExceptionImpl sqlException =
+        assertThrows(JdbcSqlExceptionImpl.class, () -> subject.getURL(STRING_COLINDEX_NOTNULL));
+    assertEquals(Code.INVALID_ARGUMENT, sqlException.getCode());
+    assertTrue(
+        sqlException.getMessage(),
+        sqlException
+            .getMessage()
+            .contains("Invalid URL: " + subject.getString(STRING_COLINDEX_NOTNULL)));
   }
 
   @Test
@@ -901,18 +897,14 @@ public class JdbcResultSetTest {
 
   @Test
   public void testGetURLLabelInvalid() throws SQLException {
-    try {
-      subject.getURL(STRING_COL_NOT_NULL);
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(
-              SpannerJdbcExceptionMatcher.matchCodeAndMessage(
-                      JdbcSqlExceptionImpl.class,
-                      Code.INVALID_ARGUMENT,
-                      "Invalid URL: " + subject.getString(STRING_COL_NOT_NULL))
-                  .matches(e))
-          .isTrue();
-    }
+    JdbcSqlExceptionImpl sqlException =
+        assertThrows(JdbcSqlExceptionImpl.class, () -> subject.getURL(STRING_COL_NOT_NULL));
+    assertEquals(Code.INVALID_ARGUMENT, sqlException.getCode());
+    assertTrue(
+        sqlException.getMessage(),
+        sqlException
+            .getMessage()
+            .contains("Invalid URL: " + subject.getString(STRING_COL_NOT_NULL)));
   }
 
   @Test
@@ -1754,52 +1746,40 @@ public class JdbcResultSetTest {
   @Test
   public void testGetBeforeNext() {
     try (JdbcResultSet rs = JdbcResultSet.of(mock(Statement.class), getMockResultSet())) {
-      rs.getBigDecimal(LONG_COLINDEX_NOTNULL);
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(
-              SpannerJdbcExceptionMatcher.matchCodeAndMessage(
-                      JdbcSqlExceptionImpl.class,
-                      Code.FAILED_PRECONDITION,
-                      "ResultSet is before first row. Call next() first.")
-                  .matches(e))
-          .isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(JdbcSqlExceptionImpl.class, () -> rs.getBigDecimal(LONG_COLINDEX_NOTNULL));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(
+          sqlException.getMessage(),
+          sqlException.getMessage().contains("ResultSet is before first row. Call next() first."));
     }
   }
 
   @Test
-  public void testGetAfterLast() {
+  public void testGetAfterLast() throws SQLException {
     try (JdbcResultSet rs = JdbcResultSet.of(mock(Statement.class), getMockResultSet())) {
       while (rs.next()) {
         assertNotNull(rs.getBigDecimal(LONG_COLINDEX_NOTNULL));
       }
-      rs.getBigDecimal(LONG_COLINDEX_NOTNULL);
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(
-              SpannerJdbcExceptionMatcher.matchCodeAndMessage(
-                      JdbcSqlExceptionImpl.class,
-                      Code.FAILED_PRECONDITION,
-                      "ResultSet is after last row. There is no more data available.")
-                  .matches(e))
-          .isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(JdbcSqlExceptionImpl.class, () -> rs.getBigDecimal(LONG_COLINDEX_NOTNULL));
+      assertEquals(Code.FAILED_PRECONDITION, sqlException.getCode());
+      assertTrue(
+          sqlException.getMessage(),
+          sqlException
+              .getMessage()
+              .contains("ResultSet is after last row. There is no more data available."));
     }
   }
 
   @Test
   public void testFindIllegalColumnName() {
-    try {
-      subject.findColumn(UNKNOWN_COLUMN);
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(
-              SpannerJdbcExceptionMatcher.matchCodeAndMessage(
-                      JdbcSqlExceptionImpl.class,
-                      Code.INVALID_ARGUMENT,
-                      "no column with label " + UNKNOWN_COLUMN + " found")
-                  .matches(e))
-          .isTrue();
-    }
+    JdbcSqlExceptionImpl sqlException =
+        assertThrows(JdbcSqlExceptionImpl.class, () -> subject.findColumn(UNKNOWN_COLUMN));
+    assertEquals(Code.INVALID_ARGUMENT, sqlException.getCode());
+    assertTrue(
+        sqlException.getMessage(),
+        sqlException.getMessage().contains("no column with label " + UNKNOWN_COLUMN + " found"));
   }
 
   @Test
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/JdbcStatementTest.java b/src/test/java/com/google/cloud/spanner/jdbc/JdbcStatementTest.java
index 727e63a..cb4cc5a 100644
--- a/src/test/java/com/google/cloud/spanner/jdbc/JdbcStatementTest.java
+++ b/src/test/java/com/google/cloud/spanner/jdbc/JdbcStatementTest.java
@@ -300,16 +300,12 @@ public class JdbcStatementTest {
   }
 
   @Test
-  public void testExecuteQueryWithUpdateStatement() {
-    try {
-      Statement statement = createStatement();
-      statement.executeQuery(UPDATE);
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(
-              JdbcExceptionMatcher.matchCodeAndMessage(Code.INVALID_ARGUMENT, "not a query")
-                  .matches(e))
-          .isTrue();
+  public void testExecuteQueryWithUpdateStatement() throws SQLException {
+    try (Statement statement = createStatement()) {
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(JdbcSqlExceptionImpl.class, () -> statement.executeQuery(UPDATE));
+      assertEquals(Code.INVALID_ARGUMENT, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("not a query"));
     }
   }
 
@@ -325,28 +321,22 @@ public class JdbcStatementTest {
   }
 
   @Test
-  public void testExecuteQueryWithDdlStatement() {
-    try {
-      Statement statement = createStatement();
-      statement.executeQuery(DDL);
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(
-              JdbcExceptionMatcher.matchCodeAndMessage(Code.INVALID_ARGUMENT, "not a query")
-                  .matches(e))
-          .isTrue();
+  public void testExecuteQueryWithDdlStatement() throws SQLException {
+    try (Statement statement = createStatement()) {
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(JdbcSqlExceptionImpl.class, () -> statement.executeQuery(DDL));
+      assertEquals(Code.INVALID_ARGUMENT, sqlException.getCode());
+      assertTrue(sqlException.getMessage(), sqlException.getMessage().contains("not a query"));
     }
   }
 
   @Test
   public void testExecuteUpdate() throws SQLException {
-    Statement statement = createStatement();
-    assertThat(statement.executeUpdate(UPDATE)).isEqualTo(1);
-    try {
-      statement.executeUpdate(LARGE_UPDATE);
-      fail("missing expected exception");
-    } catch (JdbcSqlExceptionImpl e) {
-      assertThat(e.getCode()).isEqualTo(Code.OUT_OF_RANGE);
+    try (Statement statement = createStatement()) {
+      assertEquals(1, statement.executeUpdate(UPDATE));
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(JdbcSqlExceptionImpl.class, () -> statement.executeUpdate(LARGE_UPDATE));
+      assertEquals(Code.OUT_OF_RANGE, sqlException.getCode());
     }
   }
 
@@ -423,34 +413,31 @@ public class JdbcStatementTest {
   }
 
   @Test
-  public void testExecuteUpdateWithSelectStatement() {
-    try {
-      Statement statement = createStatement();
-      statement.executeUpdate(SELECT);
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(
-              JdbcExceptionMatcher.matchCodeAndMessage(
-                      Code.INVALID_ARGUMENT,
-                      "The statement is not a non-returning DML or DDL statement")
-                  .matches(e))
-          .isTrue();
+  public void testExecuteUpdateWithSelectStatement() throws SQLException {
+    try (Statement statement = createStatement()) {
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(JdbcSqlExceptionImpl.class, () -> statement.executeUpdate(SELECT));
+      assertEquals(Code.INVALID_ARGUMENT, sqlException.getCode());
+      assertTrue(
+          sqlException.getMessage(),
+          sqlException
+              .getMessage()
+              .contains("The statement is not a non-returning DML or DDL statement"));
     }
   }
 
   @Test
-  public void testExecuteUpdateWithDmlReturningStatement() {
-    try {
-      Statement statement = createStatement();
-      SQLException e =
-          assertThrows(SQLException.class, () -> statement.executeUpdate(getDmlReturningSql()));
+  public void testExecuteUpdateWithDmlReturningStatement() throws SQLException {
+    try (Statement statement = createStatement()) {
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class, () -> statement.executeUpdate(getDmlReturningSql()));
+      assertEquals(Code.INVALID_ARGUMENT, sqlException.getCode());
       assertTrue(
-          JdbcExceptionMatcher.matchCodeAndMessage(
-                  Code.INVALID_ARGUMENT,
-                  "The statement is not a non-returning DML or DDL statement")
-              .matches(e));
-    } catch (SQLException e) {
-      // ignore exception.
+          sqlException.getMessage(),
+          sqlException
+              .getMessage()
+              .contains("The statement is not a non-returning DML or DDL statement"));
     }
   }
 
@@ -490,32 +477,36 @@ public class JdbcStatementTest {
   }
 
   @Test
-  public void testNoBatchMixing() {
+  public void testNoBatchMixing() throws SQLException {
     try (Statement statement = createStatement()) {
       statement.addBatch("INSERT INTO FOO (ID, NAME) VALUES (1, 'FOO')");
-      statement.addBatch("CREATE TABLE FOO (ID INT64, NAME STRING(100)) PRIMARY KEY (ID)");
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(
-              JdbcExceptionMatcher.matchCodeAndMessage(
-                      Code.INVALID_ARGUMENT,
-                      "Mixing DML and DDL statements in a batch is not allowed.")
-                  .matches(e))
-          .isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () ->
+                  statement.addBatch(
+                      "CREATE TABLE FOO (ID INT64, NAME STRING(100)) PRIMARY KEY (ID)"));
+      assertEquals(Code.INVALID_ARGUMENT, sqlException.getCode());
+      assertTrue(
+          sqlException.getMessage(),
+          sqlException
+              .getMessage()
+              .contains("Mixing DML and DDL statements in a batch is not allowed."));
     }
   }
 
   @Test
-  public void testNoBatchQuery() {
+  public void testNoBatchQuery() throws SQLException {
     try (Statement statement = createStatement()) {
-      statement.addBatch("SELECT * FROM FOO");
-    } catch (SQLException e) {
-      assertThat(
-              JdbcExceptionMatcher.matchCodeAndMessage(
-                      Code.INVALID_ARGUMENT,
-                      "The statement is not suitable for batching. Only DML and DDL statements are allowed for batching.")
-                  .matches(e))
-          .isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(JdbcSqlExceptionImpl.class, () -> statement.addBatch("SELECT * FROM FOO"));
+      assertEquals(Code.INVALID_ARGUMENT, sqlException.getCode());
+      assertTrue(
+          sqlException.getMessage(),
+          sqlException
+              .getMessage()
+              .contains(
+                  "The statement is not suitable for batching. Only DML and DDL statements are allowed for batching."));
     }
   }
 
@@ -559,7 +550,7 @@ public class JdbcStatementTest {
   }
 
   @Test
-  public void testConvertUpdateCounts() {
+  public void testConvertUpdateCounts() throws SQLException {
     JdbcConnection connection = mock(JdbcConnection.class);
     when(connection.getDialect()).thenReturn(dialect);
     try (JdbcStatement statement = new JdbcStatement(connection)) {
@@ -568,10 +559,11 @@ public class JdbcStatementTest {
       updateCounts = statement.convertUpdateCounts(new long[] {0L, 0L, 0L});
       assertThat(updateCounts).asList().containsExactly(0, 0, 0);
 
-      statement.convertUpdateCounts(new long[] {1L, Integer.MAX_VALUE + 1L});
-      fail("missing expected exception");
-    } catch (SQLException e) {
-      assertThat(JdbcExceptionMatcher.matchCode(Code.OUT_OF_RANGE).matches(e)).isTrue();
+      JdbcSqlExceptionImpl sqlException =
+          assertThrows(
+              JdbcSqlExceptionImpl.class,
+              () -> statement.convertUpdateCounts(new long[] {1L, Integer.MAX_VALUE + 1L}));
+      assertEquals(Code.OUT_OF_RANGE, sqlException.getCode());
     }
   }
 
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/SpannerJdbcExceptionMatcher.java b/src/test/java/com/google/cloud/spanner/jdbc/SpannerJdbcExceptionMatcher.java
deleted file mode 100644
index 062a5ac..0000000
--- a/src/test/java/com/google/cloud/spanner/jdbc/SpannerJdbcExceptionMatcher.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * 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.google.cloud.spanner.jdbc;
-
-import com.google.common.base.Preconditions;
-import com.google.rpc.Code;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
-
-public final class SpannerJdbcExceptionMatcher<T extends JdbcSqlException> extends BaseMatcher<T> {
-  private final Class<T> exceptionClass;
-  private final Code errorCode;
-  private final String message;
-
-  public static <T extends JdbcSqlException> SpannerJdbcExceptionMatcher<T> matchCode(
-      Class<T> exceptionClass, Code errorCode) {
-    Preconditions.checkNotNull(exceptionClass);
-    Preconditions.checkNotNull(errorCode);
-    return new SpannerJdbcExceptionMatcher<>(exceptionClass, errorCode, null);
-  }
-
-  public static <T extends JdbcSqlException> SpannerJdbcExceptionMatcher<T> matchCodeAndMessage(
-      Class<T> exceptionClass, Code errorCode, String message) {
-    Preconditions.checkNotNull(exceptionClass);
-    Preconditions.checkNotNull(errorCode);
-    Preconditions.checkNotNull(message);
-    return new SpannerJdbcExceptionMatcher<>(exceptionClass, errorCode, message);
-  }
-
-  private SpannerJdbcExceptionMatcher(Class<T> exceptionClass, Code errorCode, String message) {
-    this.exceptionClass = exceptionClass;
-    this.errorCode = errorCode;
-    this.message = message;
-  }
-
-  @Override
-  public boolean matches(Object item) {
-    if (exceptionClass.isAssignableFrom(item.getClass())) {
-      JdbcSqlException exception = (JdbcSqlException) item;
-      if (message == null) {
-        return exception.getErrorCode() == errorCode.getNumber();
-      }
-      return exception.getErrorCode() == errorCode.getNumber()
-          && exception.getMessage().contains(": " + message);
-    }
-    return false;
-  }
-
-  @Override
-  public void describeTo(Description description) {
-    description.appendText(exceptionClass.getName() + " with code " + errorCode.name());
-    if (message != null) {
-      description.appendText(" - " + JdbcSqlException.class.getName() + " with message " + message);
-    }
-  }
-}
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/it/ITAbstractJdbcTest.java b/src/test/java/com/google/cloud/spanner/jdbc/it/ITAbstractJdbcTest.java
index 9391b52..049d51c 100644
--- a/src/test/java/com/google/cloud/spanner/jdbc/it/ITAbstractJdbcTest.java
+++ b/src/test/java/com/google/cloud/spanner/jdbc/it/ITAbstractJdbcTest.java
@@ -124,9 +124,6 @@ public class ITAbstractJdbcTest {
       default:
         scriptFile = "CreateMusicTables.sql";
     }
-    if (dialect != Dialect.POSTGRESQL && isUsingEmulator()) {
-      scriptFile = "CreateMusicTables_Emulator.sql";
-    }
     return AbstractSqlScriptVerifier.readStatementsFromFile(scriptFile, ITAbstractJdbcTest.class)
         .stream()
         .filter(sql -> !(sql.contains("START BATCH") || sql.contains("RUN BATCH")))
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcDatabaseMetaDataTest.java b/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcDatabaseMetaDataTest.java
index 820bdfa..903df91 100644
--- a/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcDatabaseMetaDataTest.java
+++ b/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcDatabaseMetaDataTest.java
@@ -16,20 +16,14 @@
 
 package com.google.cloud.spanner.jdbc.it;
 
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeFalse;
 
 import com.google.cloud.spanner.Database;
 import com.google.cloud.spanner.ParallelIntegrationTest;
-import com.google.cloud.spanner.testing.EmulatorSpannerHelper;
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
 import java.sql.ResultSet;
@@ -177,63 +171,59 @@ public class ITJdbcDatabaseMetaDataTest extends ITAbstractJdbcTest {
               .getColumns(DEFAULT_CATALOG, DEFAULT_SCHEMA, TABLE_WITH_ALL_COLS, null)) {
         int pos = 1;
         for (Column col : EXPECTED_COLUMNS) {
-          assertThat(rs.next(), is(true));
-          assertThat(rs.getString("TABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-          assertThat(rs.getString("TABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-          assertThat(rs.getString("TABLE_NAME"), is(equalTo(TABLE_WITH_ALL_COLS)));
-          assertThat(rs.getString("COLUMN_NAME"), is(equalTo(col.name)));
-          assertThat(rs.getInt("DATA_TYPE"), is(equalTo(col.type)));
-          assertThat(rs.getString("TYPE_NAME"), is(equalTo(col.typeName)));
+          assertTrue(rs.next());
+          assertEquals(DEFAULT_CATALOG, rs.getString("TABLE_CAT"));
+          assertEquals(DEFAULT_SCHEMA, rs.getString("TABLE_SCHEM"));
+          assertEquals(TABLE_WITH_ALL_COLS, rs.getString("TABLE_NAME"));
+          assertEquals(col.name, rs.getString("COLUMN_NAME"));
+          assertEquals(col.type, rs.getInt("DATA_TYPE"));
+          assertEquals(col.typeName, rs.getString("TYPE_NAME"));
           if (col.colSize == null) {
-            assertThat(rs.getInt("COLUMN_SIZE"), is(equalTo(0)));
-            assertThat(rs.wasNull(), is(true));
+            assertEquals(0, rs.getInt("COLUMN_SIZE"));
+            assertTrue(rs.wasNull());
           } else {
-            assertThat(rs.getInt("COLUMN_SIZE"), is(equalTo(col.colSize)));
+            assertEquals(col.colSize.intValue(), rs.getInt("COLUMN_SIZE"));
           }
           rs.getObject("BUFFER_LENGTH"); // just assert that it exists
           if (col.decimalDigits == null) {
-            assertThat(rs.getInt("DECIMAL_DIGITS"), is(equalTo(0)));
-            assertThat(rs.wasNull(), is(true));
+            assertEquals(0, rs.getInt("DECIMAL_DIGITS"));
+            assertTrue(rs.wasNull());
           } else {
-            assertThat(rs.getInt("DECIMAL_DIGITS"), is(equalTo(col.decimalDigits)));
+            assertEquals(col.decimalDigits.intValue(), rs.getInt("DECIMAL_DIGITS"));
           }
           if (col.radix == null) {
-            assertThat(rs.getInt("NUM_PREC_RADIX"), is(equalTo(0)));
-            assertThat(rs.wasNull(), is(true));
+            assertEquals(0, rs.getInt("NUM_PREC_RADIX"));
+            assertTrue(rs.wasNull());
           } else {
-            assertThat(rs.getInt("NUM_PREC_RADIX"), is(equalTo(col.radix)));
+            assertEquals(col.radix.intValue(), rs.getInt("NUM_PREC_RADIX"));
           }
-          assertThat(
-              rs.getInt("NULLABLE"),
-              is(
-                  equalTo(
-                      col.nullable
-                          ? DatabaseMetaData.columnNullable
-                          : DatabaseMetaData.columnNoNulls)));
-          assertThat(rs.getString("REMARKS"), is(nullValue()));
-          assertThat(rs.getString("COLUMN_DEF"), is(nullValue()));
-          assertThat(rs.getInt("SQL_DATA_TYPE"), is(equalTo(0)));
-          assertThat(rs.getInt("SQL_DATETIME_SUB"), is(equalTo(0)));
+          assertEquals(
+              col.nullable ? DatabaseMetaData.columnNullable : DatabaseMetaData.columnNoNulls,
+              rs.getInt("NULLABLE"));
+          assertNull(rs.getString("REMARKS"));
+          assertNull(rs.getString("COLUMN_DEF"));
+          assertEquals(0, rs.getInt("SQL_DATA_TYPE"));
+          assertEquals(0, rs.getInt("SQL_DATETIME_SUB"));
           if (col.charOctetLength == null) {
-            assertThat(rs.getInt("CHAR_OCTET_LENGTH"), is(equalTo(0)));
-            assertThat(rs.wasNull(), is(true));
+            assertEquals(0, rs.getInt("CHAR_OCTET_LENGTH"));
+            assertTrue(rs.wasNull());
           } else {
-            assertThat(rs.getInt("CHAR_OCTET_LENGTH"), is(equalTo(col.charOctetLength)));
+            assertEquals(col.charOctetLength.intValue(), rs.getInt("CHAR_OCTET_LENGTH"));
           }
-          assertThat(rs.getInt("ORDINAL_POSITION"), is(equalTo(pos)));
-          assertThat(rs.getString("IS_NULLABLE"), is(equalTo(col.nullable ? "YES" : "NO")));
-          assertThat(rs.getString("SCOPE_CATALOG"), is(nullValue()));
-          assertThat(rs.getString("SCOPE_SCHEMA"), is(nullValue()));
-          assertThat(rs.getString("SCOPE_TABLE"), is(nullValue()));
-          assertThat(rs.getShort("SOURCE_DATA_TYPE"), is(equalTo((short) 0)));
-          assertThat(rs.wasNull(), is(true));
-          assertThat(rs.getString("IS_AUTOINCREMENT"), is(equalTo("NO")));
-          assertThat(rs.getString("IS_GENERATEDCOLUMN"), is(equalTo(col.computed ? "YES" : "NO")));
-          assertThat(rs.getMetaData().getColumnCount(), is(equalTo(24)));
+          assertEquals(pos, rs.getInt("ORDINAL_POSITION"));
+          assertEquals(col.nullable ? "YES" : "NO", rs.getString("IS_NULLABLE"));
+          assertNull(rs.getString("SCOPE_CATALOG"));
+          assertNull(rs.getString("SCOPE_SCHEMA"));
+          assertNull(rs.getString("SCOPE_TABLE"));
+          assertEquals(0, rs.getShort("SOURCE_DATA_TYPE"));
+          assertTrue(rs.wasNull());
+          assertEquals("NO", rs.getString("IS_AUTOINCREMENT"));
+          assertEquals(col.computed ? "YES" : "NO", rs.getString("IS_GENERATEDCOLUMN"));
+          assertEquals(24, rs.getMetaData().getColumnCount());
 
           pos++;
         }
-        assertThat(rs.next(), is(false));
+        assertFalse(rs.next());
       }
     }
   }
@@ -251,25 +241,21 @@ public class ITJdbcDatabaseMetaDataTest extends ITAbstractJdbcTest {
                   DEFAULT_CATALOG,
                   DEFAULT_SCHEMA,
                   ALBUMS_TABLE)) {
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("PKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_NAME"), is(equalTo("Singers")));
-        assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("SingerId")));
-        assertThat(rs.getString("FKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_NAME"), is(equalTo("Albums")));
-        assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("SingerId")));
-        assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 1)));
-        assertThat(
-            rs.getShort("UPDATE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyNoAction)));
-        assertThat(
-            rs.getShort("DELETE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyCascade)));
-        assertThat(rs.getString("FK_NAME"), is(nullValue()));
-        assertThat(rs.getString("PK_NAME"), is(equalTo("PRIMARY_KEY")));
-        assertThat(
-            rs.getShort("DEFERRABILITY"),
-            is(equalTo((short) DatabaseMetaData.importedKeyNotDeferrable)));
+        assertTrue(rs.next());
+        assertEquals("", rs.getString("PKTABLE_CAT"));
+        assertEquals("", rs.getString("PKTABLE_SCHEM"));
+        assertEquals("Singers", rs.getString("PKTABLE_NAME"));
+        assertEquals("SingerId", rs.getString("PKCOLUMN_NAME"));
+        assertEquals("", rs.getString("FKTABLE_CAT"));
+        assertEquals("", rs.getString("FKTABLE_SCHEM"));
+        assertEquals("Albums", rs.getString("FKTABLE_NAME"));
+        assertEquals("SingerId", rs.getString("FKCOLUMN_NAME"));
+        assertEquals(1, rs.getShort("KEY_SEQ"));
+        assertEquals(DatabaseMetaData.importedKeyNoAction, rs.getShort("UPDATE_RULE"));
+        assertEquals(DatabaseMetaData.importedKeyCascade, rs.getShort("DELETE_RULE"));
+        assertNull(rs.getString("FK_NAME"));
+        assertEquals("PRIMARY_KEY", rs.getString("PK_NAME"));
+        assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getShort("DEFERRABILITY"));
       }
       try (ResultSet rs =
           connection
@@ -281,45 +267,37 @@ public class ITJdbcDatabaseMetaDataTest extends ITAbstractJdbcTest {
                   DEFAULT_CATALOG,
                   DEFAULT_SCHEMA,
                   SONGS_TABLE)) {
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("PKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_NAME"), is(equalTo("Albums")));
-        assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("SingerId")));
-        assertThat(rs.getString("FKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_NAME"), is(equalTo("Songs")));
-        assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("SingerId")));
-        assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 1)));
-        assertThat(
-            rs.getShort("UPDATE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyNoAction)));
-        assertThat(
-            rs.getShort("DELETE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyCascade)));
-        assertThat(rs.getString("FK_NAME"), is(nullValue()));
-        assertThat(rs.getString("PK_NAME"), is(equalTo("PRIMARY_KEY")));
-        assertThat(
-            rs.getShort("DEFERRABILITY"),
-            is(equalTo((short) DatabaseMetaData.importedKeyNotDeferrable)));
-
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("PKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_NAME"), is(equalTo("Albums")));
-        assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("AlbumId")));
-        assertThat(rs.getString("FKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_NAME"), is(equalTo("Songs")));
-        assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("AlbumId")));
-        assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 2)));
-        assertThat(
-            rs.getShort("UPDATE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyNoAction)));
-        assertThat(
-            rs.getShort("DELETE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyCascade)));
-        assertThat(rs.getString("FK_NAME"), is(nullValue()));
-        assertThat(rs.getString("PK_NAME"), is(equalTo("PRIMARY_KEY")));
-        assertThat(
-            rs.getShort("DEFERRABILITY"),
-            is(equalTo((short) DatabaseMetaData.importedKeyNotDeferrable)));
+        assertTrue(rs.next());
+        assertEquals("", rs.getString("PKTABLE_CAT"));
+        assertEquals("", rs.getString("PKTABLE_SCHEM"));
+        assertEquals("Albums", rs.getString("PKTABLE_NAME"));
+        assertEquals("SingerId", rs.getString("PKCOLUMN_NAME"));
+        assertEquals("", rs.getString("FKTABLE_CAT"));
+        assertEquals("", rs.getString("FKTABLE_SCHEM"));
+        assertEquals("Songs", rs.getString("FKTABLE_NAME"));
+        assertEquals("SingerId", rs.getString("FKCOLUMN_NAME"));
+        assertEquals(1, rs.getShort("KEY_SEQ"));
+        assertEquals(DatabaseMetaData.importedKeyNoAction, rs.getShort("UPDATE_RULE"));
+        assertEquals(DatabaseMetaData.importedKeyCascade, rs.getShort("DELETE_RULE"));
+        assertNull(rs.getString("FK_NAME"));
+        assertEquals("PRIMARY_KEY", rs.getString("PK_NAME"));
+        assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getShort("DEFERRABILITY"));
+
+        assertTrue(rs.next());
+        assertEquals("", rs.getString("PKTABLE_CAT"));
+        assertEquals("", rs.getString("PKTABLE_SCHEM"));
+        assertEquals("Albums", rs.getString("PKTABLE_NAME"));
+        assertEquals("AlbumId", rs.getString("PKCOLUMN_NAME"));
+        assertEquals("", rs.getString("FKTABLE_CAT"));
+        assertEquals("", rs.getString("FKTABLE_SCHEM"));
+        assertEquals("Songs", rs.getString("FKTABLE_NAME"));
+        assertEquals("AlbumId", rs.getString("FKCOLUMN_NAME"));
+        assertEquals(2, rs.getShort("KEY_SEQ"));
+        assertEquals(DatabaseMetaData.importedKeyNoAction, rs.getShort("UPDATE_RULE"));
+        assertEquals(DatabaseMetaData.importedKeyCascade, rs.getShort("DELETE_RULE"));
+        assertNull(rs.getString("FK_NAME"));
+        assertEquals("PRIMARY_KEY", rs.getString("PK_NAME"));
+        assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getShort("DEFERRABILITY"));
       }
 
       try (ResultSet rs =
@@ -332,26 +310,22 @@ public class ITJdbcDatabaseMetaDataTest extends ITAbstractJdbcTest {
                   DEFAULT_CATALOG,
                   DEFAULT_SCHEMA,
                   CONCERTS_TABLE)) {
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("PKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_NAME"), is(equalTo("Singers")));
-        assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("SingerId")));
-        assertThat(rs.getString("FKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_NAME"), is(equalTo("Concerts")));
-        assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("SingerId")));
-        assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 1)));
-        assertThat(
-            rs.getShort("UPDATE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyNoAction)));
-        assertThat(
-            rs.getShort("DELETE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyNoAction)));
-        assertThat(rs.getString("FK_NAME"), is(equalTo("Fk_Concerts_Singer")));
-        assertThat(rs.getString("PK_NAME"), is(equalTo("PK_Singers")));
-        assertThat(
-            rs.getShort("DEFERRABILITY"),
-            is(equalTo((short) DatabaseMetaData.importedKeyNotDeferrable)));
-        assertThat(rs.next(), is(false));
+        assertTrue(rs.next());
+        assertEquals("", rs.getString("PKTABLE_CAT"));
+        assertEquals("", rs.getString("PKTABLE_SCHEM"));
+        assertEquals("Singers", rs.getString("PKTABLE_NAME"));
+        assertEquals("SingerId", rs.getString("PKCOLUMN_NAME"));
+        assertEquals("", rs.getString("FKTABLE_CAT"));
+        assertEquals("", rs.getString("FKTABLE_SCHEM"));
+        assertEquals("Concerts", rs.getString("FKTABLE_NAME"));
+        assertEquals("SingerId", rs.getString("FKCOLUMN_NAME"));
+        assertEquals(1, rs.getShort("KEY_SEQ"));
+        assertEquals(DatabaseMetaData.importedKeyNoAction, rs.getShort("UPDATE_RULE"));
+        assertEquals(DatabaseMetaData.importedKeyNoAction, rs.getShort("DELETE_RULE"));
+        assertEquals("Fk_Concerts_Singer", rs.getString("FK_NAME"));
+        assertEquals("PK_Singers", rs.getString("PK_NAME"));
+        assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getShort("DEFERRABILITY"));
+        assertFalse(rs.next());
       }
 
       try (ResultSet rs =
@@ -365,64 +339,52 @@ public class ITJdbcDatabaseMetaDataTest extends ITAbstractJdbcTest {
                   DEFAULT_SCHEMA,
                   TABLE_WITH_REF)) {
 
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("PKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_NAME"), is(equalTo(TABLE_WITH_ALL_COLS)));
-        assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("ColFloat64")));
-        assertThat(rs.getString("FKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_NAME"), is(equalTo(TABLE_WITH_REF)));
-        assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("RefFloat")));
-        assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 1)));
-        assertThat(
-            rs.getShort("UPDATE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyNoAction)));
-        assertThat(
-            rs.getShort("DELETE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyNoAction)));
-        assertThat(rs.getString("FK_NAME"), is(equalTo("Fk_TableWithRef_TableWithAllColumnTypes")));
-        assertThat(
-            rs.getShort("DEFERRABILITY"),
-            is(equalTo((short) DatabaseMetaData.importedKeyNotDeferrable)));
-
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("PKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_NAME"), is(equalTo(TABLE_WITH_ALL_COLS)));
-        assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("ColString")));
-        assertThat(rs.getString("FKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_NAME"), is(equalTo(TABLE_WITH_REF)));
-        assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("RefString")));
-        assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 2)));
-        assertThat(
-            rs.getShort("UPDATE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyNoAction)));
-        assertThat(
-            rs.getShort("DELETE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyNoAction)));
-        assertThat(rs.getString("FK_NAME"), is(equalTo("Fk_TableWithRef_TableWithAllColumnTypes")));
-        assertThat(
-            rs.getShort("DEFERRABILITY"),
-            is(equalTo((short) DatabaseMetaData.importedKeyNotDeferrable)));
-
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("PKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("PKTABLE_NAME"), is(equalTo(TABLE_WITH_ALL_COLS)));
-        assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("ColDate")));
-        assertThat(rs.getString("FKTABLE_CAT"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo("")));
-        assertThat(rs.getString("FKTABLE_NAME"), is(equalTo(TABLE_WITH_REF)));
-        assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("RefDate")));
-        assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 3)));
-        assertThat(
-            rs.getShort("UPDATE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyNoAction)));
-        assertThat(
-            rs.getShort("DELETE_RULE"), is(equalTo((short) DatabaseMetaData.importedKeyNoAction)));
-        assertThat(rs.getString("FK_NAME"), is(equalTo("Fk_TableWithRef_TableWithAllColumnTypes")));
-        assertThat(
-            rs.getShort("DEFERRABILITY"),
-            is(equalTo((short) DatabaseMetaData.importedKeyNotDeferrable)));
-
-        assertThat(rs.next(), is(false));
+        assertTrue(rs.next());
+        assertEquals("", rs.getString("PKTABLE_CAT"));
+        assertEquals("", rs.getString("PKTABLE_SCHEM"));
+        assertEquals(TABLE_WITH_ALL_COLS, rs.getString("PKTABLE_NAME"));
+        assertEquals("ColFloat64", rs.getString("PKCOLUMN_NAME"));
+        assertEquals("", rs.getString("FKTABLE_CAT"));
+        assertEquals("", rs.getString("FKTABLE_SCHEM"));
+        assertEquals(TABLE_WITH_REF, rs.getString("FKTABLE_NAME"));
+        assertEquals("RefFloat", rs.getString("FKCOLUMN_NAME"));
+        assertEquals(1, rs.getShort("KEY_SEQ"));
+        assertEquals(DatabaseMetaData.importedKeyNoAction, rs.getShort("UPDATE_RULE"));
+        assertEquals(DatabaseMetaData.importedKeyNoAction, rs.getShort("DELETE_RULE"));
+        assertEquals("Fk_TableWithRef_TableWithAllColumnTypes", rs.getString("FK_NAME"));
+        assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getShort("DEFERRABILITY"));
+
+        assertTrue(rs.next());
+        assertEquals("", rs.getString("PKTABLE_CAT"));
+        assertEquals("", rs.getString("PKTABLE_SCHEM"));
+        assertEquals(TABLE_WITH_ALL_COLS, rs.getString("PKTABLE_NAME"));
+        assertEquals("ColString", rs.getString("PKCOLUMN_NAME"));
+        assertEquals("", rs.getString("FKTABLE_CAT"));
+        assertEquals("", rs.getString("FKTABLE_SCHEM"));
+        assertEquals(TABLE_WITH_REF, rs.getString("FKTABLE_NAME"));
+        assertEquals("RefString", rs.getString("FKCOLUMN_NAME"));
+        assertEquals(2, rs.getShort("KEY_SEQ"));
+        assertEquals(DatabaseMetaData.importedKeyNoAction, rs.getShort("UPDATE_RULE"));
+        assertEquals(DatabaseMetaData.importedKeyNoAction, rs.getShort("DELETE_RULE"));
+        assertEquals("Fk_TableWithRef_TableWithAllColumnTypes", rs.getString("FK_NAME"));
+        assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getShort("DEFERRABILITY"));
+
+        assertTrue(rs.next());
+        assertEquals("", rs.getString("PKTABLE_CAT"));
+        assertEquals("", rs.getString("PKTABLE_SCHEM"));
+        assertEquals(TABLE_WITH_ALL_COLS, rs.getString("PKTABLE_NAME"));
+        assertEquals("ColDate", rs.getString("PKCOLUMN_NAME"));
+        assertEquals("", rs.getString("FKTABLE_CAT"));
+        assertEquals("", rs.getString("FKTABLE_SCHEM"));
+        assertEquals(TABLE_WITH_REF, rs.getString("FKTABLE_NAME"));
+        assertEquals("RefDate", rs.getString("FKCOLUMN_NAME"));
+        assertEquals(3, rs.getShort("KEY_SEQ"));
+        assertEquals(DatabaseMetaData.importedKeyNoAction, rs.getShort("UPDATE_RULE"));
+        assertEquals(DatabaseMetaData.importedKeyNoAction, rs.getShort("DELETE_RULE"));
+        assertEquals("Fk_TableWithRef_TableWithAllColumnTypes", rs.getString("FK_NAME"));
+        assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getShort("DEFERRABILITY"));
+
+        assertFalse(rs.next());
       }
       // try getting self-references
       try (ResultSet rs =
@@ -435,15 +397,15 @@ public class ITJdbcDatabaseMetaDataTest extends ITAbstractJdbcTest {
                   DEFAULT_CATALOG,
                   DEFAULT_SCHEMA,
                   ALBUMS_TABLE)) {
-        assertThat(rs.next(), is(false));
+        assertFalse(rs.next());
       }
       // try getting all cross-references in the database
       try (ResultSet rs =
           connection.getMetaData().getCrossReference(null, null, null, null, null, null)) {
         for (int i = 0; i < 7; i++) {
-          assertThat(rs.next(), is(true));
+          assertTrue(rs.next());
         }
-        assertThat(rs.next(), is(false));
+        assertFalse(rs.next());
       }
     }
   }
@@ -524,33 +486,33 @@ public class ITJdbcDatabaseMetaDataTest extends ITAbstractJdbcTest {
               .getIndexInfo(DEFAULT_CATALOG, DEFAULT_SCHEMA, null, false, false)) {
 
         for (IndexInfo index : EXPECTED_INDICES) {
-          assertThat(rs.next(), is(true));
-          assertThat(rs.getString("TABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-          assertThat(rs.getString("TABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-          assertThat(rs.getString("TABLE_NAME"), is(equalTo(index.tableName)));
-          assertThat(rs.getBoolean("NON_UNIQUE"), is(index.nonUnique));
-          assertThat(rs.getString("INDEX_QUALIFIER"), is(equalTo(DEFAULT_CATALOG)));
+          assertTrue(rs.next());
+          assertEquals(DEFAULT_CATALOG, rs.getString("TABLE_CAT"));
+          assertEquals(DEFAULT_SCHEMA, rs.getString("TABLE_SCHEM"));
+          assertEquals(index.tableName, rs.getString("TABLE_NAME"));
+          assertEquals(index.nonUnique, rs.getBoolean("NON_UNIQUE"));
+          assertEquals(DEFAULT_CATALOG, rs.getString("INDEX_QUALIFIER"));
           // Foreign key index names are automatically generated.
           if (!"FOREIGN_KEY".equals(index.indexName) && !"GENERATED".equals(index.indexName)) {
-            assertThat(rs.getString("INDEX_NAME"), is(equalTo(index.indexName)));
+            assertEquals(index.indexName, rs.getString("INDEX_NAME"));
           }
           if (index.indexName.equals("PRIMARY_KEY")) {
-            assertThat(rs.getShort("TYPE"), is(equalTo(DatabaseMetaData.tableIndexClustered)));
+            assertEquals(DatabaseMetaData.tableIndexClustered, rs.getShort("TYPE"));
           } else {
-            assertThat(rs.getShort("TYPE"), is(equalTo(DatabaseMetaData.tableIndexHashed)));
+            assertEquals(DatabaseMetaData.tableIndexHashed, rs.getShort("TYPE"));
           }
-          assertThat(rs.getShort("ORDINAL_POSITION"), is(equalTo(index.ordinalPosition)));
+          assertEquals(index.ordinalPosition, rs.getShort("ORDINAL_POSITION"));
           if (index.ordinalPosition == 0) {
-            assertThat(rs.wasNull(), is(true));
+            assertTrue(rs.wasNull());
           }
-          assertThat(rs.getString("COLUMN_NAME"), is(equalTo(index.columnName)));
-          assertThat(rs.getString("ASC_OR_DESC"), is(equalTo(index.ascDesc)));
-          assertThat(rs.getInt("CARDINALITY"), is(equalTo(-1)));
-          assertThat(rs.getInt("PAGES"), is(equalTo(-1)));
-          assertThat(rs.getString("FILTER_CONDITION"), is(nullValue()));
+          assertEquals(index.columnName, rs.getString("COLUMN_NAME"));
+          assertEquals(index.ascDesc, rs.getString("ASC_OR_DESC"));
+          assertEquals(-1, rs.getInt("CARDINALITY"));
+          assertEquals(-1, rs.getInt("PAGES"));
+          assertNull(rs.getString("FILTER_CONDITION"));
         }
         // all indices found
-        assertThat(rs.next(), is(false));
+        assertFalse(rs.next());
       }
     }
   }
@@ -604,170 +566,170 @@ public class ITJdbcDatabaseMetaDataTest extends ITAbstractJdbcTest {
   }
 
   private void assertImportedKeysSingers(ResultSet rs) throws SQLException {
-    assertThat(rs.next(), is(false));
+    assertFalse(rs.next());
   }
 
   private void assertImportedKeysTableWithRef(ResultSet rs) throws SQLException {
-    assertThat(rs.next(), is(true));
-    assertThat(rs.getString("PKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("PKTABLE_NAME"), is(equalTo(TABLE_WITH_ALL_COLS)));
-    assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("ColFloat64")));
-    assertThat(rs.getString("FKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("FKTABLE_NAME"), is(equalTo(TABLE_WITH_REF)));
-    assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("RefFloat")));
-    assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 1)));
-    assertThat(rs.getInt("UPDATE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getInt("DELETE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getString("FK_NAME"), is("Fk_TableWithRef_TableWithAllColumnTypes"));
-    assertThat(rs.getString("PK_NAME"), is(notNullValue())); // Index name is generated.
-    assertThat(rs.getInt("DEFERRABILITY"), is(equalTo(DatabaseMetaData.importedKeyNotDeferrable)));
-
-    assertThat(rs.next(), is(true));
-    assertThat(rs.getString("PKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("PKTABLE_NAME"), is(equalTo(TABLE_WITH_ALL_COLS)));
-    assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("ColString")));
-    assertThat(rs.getString("FKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("FKTABLE_NAME"), is(equalTo(TABLE_WITH_REF)));
-    assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("RefString")));
-    assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 2)));
-    assertThat(rs.getInt("UPDATE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getInt("DELETE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getString("FK_NAME"), is("Fk_TableWithRef_TableWithAllColumnTypes"));
-    assertThat(rs.getString("PK_NAME"), is(notNullValue())); // Index name is generated.
-    assertThat(rs.getInt("DEFERRABILITY"), is(equalTo(DatabaseMetaData.importedKeyNotDeferrable)));
-
-    assertThat(rs.next(), is(true));
-    assertThat(rs.getString("PKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("PKTABLE_NAME"), is(equalTo(TABLE_WITH_ALL_COLS)));
-    assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("ColDate")));
-    assertThat(rs.getString("FKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("FKTABLE_NAME"), is(equalTo(TABLE_WITH_REF)));
-    assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("RefDate")));
-    assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 3)));
-    assertThat(rs.getInt("UPDATE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getInt("DELETE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getString("FK_NAME"), is("Fk_TableWithRef_TableWithAllColumnTypes"));
-    assertThat(rs.getString("PK_NAME"), is(notNullValue())); // Index name is generated.
-    assertThat(rs.getInt("DEFERRABILITY"), is(equalTo(DatabaseMetaData.importedKeyNotDeferrable)));
-
-    assertThat(rs.next(), is(false));
+    assertTrue(rs.next());
+    assertEquals(DEFAULT_CATALOG, rs.getString("PKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("PKTABLE_SCHEM"));
+    assertEquals(TABLE_WITH_ALL_COLS, rs.getString("PKTABLE_NAME"));
+    assertEquals("ColFloat64", rs.getString("PKCOLUMN_NAME"));
+    assertEquals(DEFAULT_CATALOG, rs.getString("FKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("FKTABLE_SCHEM"));
+    assertEquals(TABLE_WITH_REF, rs.getString("FKTABLE_NAME"));
+    assertEquals("RefFloat", rs.getString("FKCOLUMN_NAME"));
+    assertEquals(1, rs.getShort("KEY_SEQ"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("UPDATE_RULE"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("DELETE_RULE"));
+    assertEquals("Fk_TableWithRef_TableWithAllColumnTypes", rs.getString("FK_NAME"));
+    assertNotNull(rs.getString("PK_NAME")); // Index name is generated.
+    assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getInt("DEFERRABILITY"));
+
+    assertTrue(rs.next());
+    assertEquals(DEFAULT_CATALOG, rs.getString("PKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("PKTABLE_SCHEM"));
+    assertEquals(TABLE_WITH_ALL_COLS, rs.getString("PKTABLE_NAME"));
+    assertEquals("ColString", rs.getString("PKCOLUMN_NAME"));
+    assertEquals(DEFAULT_CATALOG, rs.getString("FKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("FKTABLE_SCHEM"));
+    assertEquals(TABLE_WITH_REF, rs.getString("FKTABLE_NAME"));
+    assertEquals("RefString", rs.getString("FKCOLUMN_NAME"));
+    assertEquals(2, rs.getShort("KEY_SEQ"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("UPDATE_RULE"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("DELETE_RULE"));
+    assertEquals("Fk_TableWithRef_TableWithAllColumnTypes", rs.getString("FK_NAME"));
+    assertNotNull(rs.getString("PK_NAME")); // Index name is generated.
+    assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getInt("DEFERRABILITY"));
+
+    assertTrue(rs.next());
+    assertEquals(DEFAULT_CATALOG, rs.getString("PKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("PKTABLE_SCHEM"));
+    assertEquals(TABLE_WITH_ALL_COLS, rs.getString("PKTABLE_NAME"));
+    assertEquals("ColDate", rs.getString("PKCOLUMN_NAME"));
+    assertEquals(DEFAULT_CATALOG, rs.getString("FKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("FKTABLE_SCHEM"));
+    assertEquals(TABLE_WITH_REF, rs.getString("FKTABLE_NAME"));
+    assertEquals("RefDate", rs.getString("FKCOLUMN_NAME"));
+    assertEquals(3, rs.getShort("KEY_SEQ"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("UPDATE_RULE"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("DELETE_RULE"));
+    assertEquals("Fk_TableWithRef_TableWithAllColumnTypes", rs.getString("FK_NAME"));
+    assertNotNull(rs.getString("PK_NAME")); // Index name is generated.
+    assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getInt("DEFERRABILITY"));
+
+    assertFalse(rs.next());
   }
 
   private void assertImportedKeysAlbums(ResultSet rs) throws SQLException {
-    assertThat(rs.next(), is(true));
-    assertThat(rs.getString("PKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("PKTABLE_NAME"), is(equalTo(SINGERS_TABLE)));
-    assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("SingerId")));
-    assertThat(rs.getString("FKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("FKTABLE_NAME"), is(equalTo(ALBUMS_TABLE)));
-    assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("SingerId")));
-    assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 1)));
-    assertThat(rs.getInt("UPDATE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getInt("DELETE_RULE"), is(equalTo(DatabaseMetaData.importedKeyCascade)));
-    assertThat(rs.getString("FK_NAME"), is(nullValue()));
-    assertThat(rs.getString("PK_NAME"), is(equalTo("PRIMARY_KEY")));
-    assertThat(rs.getInt("DEFERRABILITY"), is(equalTo(DatabaseMetaData.importedKeyNotDeferrable)));
-
-    assertThat(rs.next(), is(false));
+    assertTrue(rs.next());
+    assertEquals(DEFAULT_CATALOG, rs.getString("PKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("PKTABLE_SCHEM"));
+    assertEquals(SINGERS_TABLE, rs.getString("PKTABLE_NAME"));
+    assertEquals("SingerId", rs.getString("PKCOLUMN_NAME"));
+    assertEquals(DEFAULT_CATALOG, rs.getString("FKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("FKTABLE_SCHEM"));
+    assertEquals(ALBUMS_TABLE, rs.getString("FKTABLE_NAME"));
+    assertEquals("SingerId", rs.getString("FKCOLUMN_NAME"));
+    assertEquals(1, rs.getShort("KEY_SEQ"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("UPDATE_RULE"));
+    assertEquals(DatabaseMetaData.importedKeyCascade, rs.getInt("DELETE_RULE"));
+    assertNull(rs.getString("FK_NAME"));
+    assertEquals("PRIMARY_KEY", rs.getString("PK_NAME"));
+    assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getInt("DEFERRABILITY"));
+
+    assertFalse(rs.next());
   }
 
   private void assertImportedKeysConcerts(ResultSet rs) throws SQLException {
-    assertThat(rs.next(), is(true));
-    assertThat(rs.getString("PKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("PKTABLE_NAME"), is(equalTo(SINGERS_TABLE)));
-    assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("SingerId")));
-    assertThat(rs.getString("FKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("FKTABLE_NAME"), is(equalTo(CONCERTS_TABLE)));
-    assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("SingerId")));
-    assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 1)));
-    assertThat(rs.getInt("UPDATE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getInt("DELETE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getString("FK_NAME"), is("Fk_Concerts_Singer"));
-    assertThat(rs.getString("PK_NAME"), is(equalTo("PK_Singers")));
-    assertThat(rs.getInt("DEFERRABILITY"), is(equalTo(DatabaseMetaData.importedKeyNotDeferrable)));
-
-    assertThat(rs.next(), is(false));
+    assertTrue(rs.next());
+    assertEquals(DEFAULT_CATALOG, rs.getString("PKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("PKTABLE_SCHEM"));
+    assertEquals(SINGERS_TABLE, rs.getString("PKTABLE_NAME"));
+    assertEquals("SingerId", rs.getString("PKCOLUMN_NAME"));
+    assertEquals(DEFAULT_CATALOG, rs.getString("FKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("FKTABLE_SCHEM"));
+    assertEquals(CONCERTS_TABLE, rs.getString("FKTABLE_NAME"));
+    assertEquals("SingerId", rs.getString("FKCOLUMN_NAME"));
+    assertEquals(1, rs.getShort("KEY_SEQ"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("UPDATE_RULE"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("DELETE_RULE"));
+    assertEquals("Fk_Concerts_Singer", rs.getString("FK_NAME"));
+    assertEquals("PK_Singers", rs.getString("PK_NAME"));
+    assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getInt("DEFERRABILITY"));
+
+    assertFalse(rs.next());
   }
 
   private void assertExportedKeysSingers(ResultSet rs) throws SQLException {
-    assertThat(rs.next(), is(true));
-    assertThat(rs.getString("PKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("PKTABLE_NAME"), is(equalTo(SINGERS_TABLE)));
-    assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("SingerId")));
-    assertThat(rs.getString("FKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("FKTABLE_NAME"), is(equalTo(ALBUMS_TABLE)));
-    assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("SingerId")));
-    assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 1)));
-    assertThat(rs.getInt("UPDATE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getInt("DELETE_RULE"), is(equalTo(DatabaseMetaData.importedKeyCascade)));
-    assertThat(rs.getString("FK_NAME"), is(nullValue()));
-    assertThat(rs.getString("PK_NAME"), is(equalTo("PRIMARY_KEY")));
-    assertThat(rs.getInt("DEFERRABILITY"), is(equalTo(DatabaseMetaData.importedKeyNotDeferrable)));
-
-    assertThat(rs.next(), is(true));
-    assertThat(rs.getString("PKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("PKTABLE_NAME"), is(equalTo(SINGERS_TABLE)));
-    assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("SingerId")));
-    assertThat(rs.getString("FKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("FKTABLE_NAME"), is(equalTo(CONCERTS_TABLE)));
-    assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("SingerId")));
-    assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 1)));
-    assertThat(rs.getInt("UPDATE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getInt("DELETE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getString("FK_NAME"), is("Fk_Concerts_Singer"));
-    assertThat(rs.getString("PK_NAME"), is(equalTo("PK_Singers")));
-    assertThat(rs.getInt("DEFERRABILITY"), is(equalTo(DatabaseMetaData.importedKeyNotDeferrable)));
-
-    assertThat(rs.next(), is(false));
+    assertTrue(rs.next());
+    assertEquals(DEFAULT_CATALOG, rs.getString("PKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("PKTABLE_SCHEM"));
+    assertEquals(SINGERS_TABLE, rs.getString("PKTABLE_NAME"));
+    assertEquals("SingerId", rs.getString("PKCOLUMN_NAME"));
+    assertEquals(DEFAULT_CATALOG, rs.getString("FKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("FKTABLE_SCHEM"));
+    assertEquals(ALBUMS_TABLE, rs.getString("FKTABLE_NAME"));
+    assertEquals("SingerId", rs.getString("FKCOLUMN_NAME"));
+    assertEquals(1, rs.getShort("KEY_SEQ"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("UPDATE_RULE"));
+    assertEquals(DatabaseMetaData.importedKeyCascade, rs.getInt("DELETE_RULE"));
+    assertNull(rs.getString("FK_NAME"));
+    assertEquals("PRIMARY_KEY", rs.getString("PK_NAME"));
+    assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getInt("DEFERRABILITY"));
+
+    assertTrue(rs.next());
+    assertEquals(DEFAULT_CATALOG, rs.getString("PKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("PKTABLE_SCHEM"));
+    assertEquals(SINGERS_TABLE, rs.getString("PKTABLE_NAME"));
+    assertEquals("SingerId", rs.getString("PKCOLUMN_NAME"));
+    assertEquals(DEFAULT_CATALOG, rs.getString("FKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("FKTABLE_SCHEM"));
+    assertEquals(CONCERTS_TABLE, rs.getString("FKTABLE_NAME"));
+    assertEquals("SingerId", rs.getString("FKCOLUMN_NAME"));
+    assertEquals(1, rs.getShort("KEY_SEQ"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("UPDATE_RULE"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("DELETE_RULE"));
+    assertEquals("Fk_Concerts_Singer", rs.getString("FK_NAME"));
+    assertEquals("PK_Singers", rs.getString("PK_NAME"));
+    assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getInt("DEFERRABILITY"));
+
+    assertFalse(rs.next());
   }
 
   private void assertKeysAlbumsSongs(ResultSet rs) throws SQLException {
-    assertThat(rs.next(), is(true));
-    assertThat(rs.getString("PKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("PKTABLE_NAME"), is(equalTo(ALBUMS_TABLE)));
-    assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("SingerId")));
-    assertThat(rs.getString("FKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("FKTABLE_NAME"), is(equalTo(SONGS_TABLE)));
-    assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("SingerId")));
-    assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 1)));
-    assertThat(rs.getInt("UPDATE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getInt("DELETE_RULE"), is(equalTo(DatabaseMetaData.importedKeyCascade)));
-    assertThat(rs.getString("FK_NAME"), is(nullValue()));
-    assertThat(rs.getString("PK_NAME"), is(equalTo("PRIMARY_KEY")));
-    assertThat(rs.getInt("DEFERRABILITY"), is(equalTo(DatabaseMetaData.importedKeyNotDeferrable)));
-
-    assertThat(rs.next(), is(true));
-    assertThat(rs.getString("PKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("PKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("PKTABLE_NAME"), is(equalTo(ALBUMS_TABLE)));
-    assertThat(rs.getString("PKCOLUMN_NAME"), is(equalTo("AlbumId")));
-    assertThat(rs.getString("FKTABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-    assertThat(rs.getString("FKTABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-    assertThat(rs.getString("FKTABLE_NAME"), is(equalTo(SONGS_TABLE)));
-    assertThat(rs.getString("FKCOLUMN_NAME"), is(equalTo("AlbumId")));
-    assertThat(rs.getShort("KEY_SEQ"), is(equalTo((short) 2)));
-    assertThat(rs.getInt("UPDATE_RULE"), is(equalTo(DatabaseMetaData.importedKeyRestrict)));
-    assertThat(rs.getInt("DELETE_RULE"), is(equalTo(DatabaseMetaData.importedKeyCascade)));
-    assertThat(rs.getString("FK_NAME"), is(nullValue()));
-    assertThat(rs.getString("PK_NAME"), is(equalTo("PRIMARY_KEY")));
-    assertThat(rs.getInt("DEFERRABILITY"), is(equalTo(DatabaseMetaData.importedKeyNotDeferrable)));
-    assertThat(rs.next(), is(false));
+    assertTrue(rs.next());
+    assertEquals(DEFAULT_CATALOG, rs.getString("PKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("PKTABLE_SCHEM"));
+    assertEquals(ALBUMS_TABLE, rs.getString("PKTABLE_NAME"));
+    assertEquals("SingerId", rs.getString("PKCOLUMN_NAME"));
+    assertEquals(DEFAULT_CATALOG, rs.getString("FKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("FKTABLE_SCHEM"));
+    assertEquals(SONGS_TABLE, rs.getString("FKTABLE_NAME"));
+    assertEquals("SingerId", rs.getString("FKCOLUMN_NAME"));
+    assertEquals(1, rs.getShort("KEY_SEQ"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("UPDATE_RULE"));
+    assertEquals(DatabaseMetaData.importedKeyCascade, rs.getInt("DELETE_RULE"));
+    assertNull(rs.getString("FK_NAME"));
+    assertEquals("PRIMARY_KEY", rs.getString("PK_NAME"));
+    assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getInt("DEFERRABILITY"));
+
+    assertTrue(rs.next());
+    assertEquals(DEFAULT_CATALOG, rs.getString("PKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("PKTABLE_SCHEM"));
+    assertEquals(ALBUMS_TABLE, rs.getString("PKTABLE_NAME"));
+    assertEquals("AlbumId", rs.getString("PKCOLUMN_NAME"));
+    assertEquals(DEFAULT_CATALOG, rs.getString("FKTABLE_CAT"));
+    assertEquals(DEFAULT_SCHEMA, rs.getString("FKTABLE_SCHEM"));
+    assertEquals(SONGS_TABLE, rs.getString("FKTABLE_NAME"));
+    assertEquals("AlbumId", rs.getString("FKCOLUMN_NAME"));
+    assertEquals(2, rs.getShort("KEY_SEQ"));
+    assertEquals(DatabaseMetaData.importedKeyRestrict, rs.getInt("UPDATE_RULE"));
+    assertEquals(DatabaseMetaData.importedKeyCascade, rs.getInt("DELETE_RULE"));
+    assertNull(rs.getString("FK_NAME"));
+    assertEquals("PRIMARY_KEY", rs.getString("PK_NAME"));
+    assertEquals(DatabaseMetaData.importedKeyNotDeferrable, rs.getInt("DEFERRABILITY"));
+    assertFalse(rs.next());
   }
 
   @Test
@@ -775,39 +737,39 @@ public class ITJdbcDatabaseMetaDataTest extends ITAbstractJdbcTest {
     try (Connection connection = createConnection(env, database)) {
       try (ResultSet rs =
           connection.getMetaData().getPrimaryKeys(DEFAULT_CATALOG, DEFAULT_SCHEMA, SINGERS_TABLE)) {
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("TABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-        assertThat(rs.getString("TABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-        assertThat(rs.getString("TABLE_NAME"), is(equalTo(SINGERS_TABLE)));
-        assertThat(rs.getString("COLUMN_NAME"), is(equalTo("SingerId")));
-        assertThat(rs.getInt("KEY_SEQ"), is(equalTo(1)));
-        assertThat(rs.getString("PK_NAME"), is(equalTo("PRIMARY_KEY")));
-        assertThat(rs.next(), is(false));
+        assertTrue(rs.next());
+        assertEquals(DEFAULT_CATALOG, rs.getString("TABLE_CAT"));
+        assertEquals(DEFAULT_SCHEMA, rs.getString("TABLE_SCHEM"));
+        assertEquals(SINGERS_TABLE, rs.getString("TABLE_NAME"));
+        assertEquals("SingerId", rs.getString("COLUMN_NAME"));
+        assertEquals(1, rs.getInt("KEY_SEQ"));
+        assertEquals("PRIMARY_KEY", rs.getString("PK_NAME"));
+        assertFalse(rs.next());
       }
       try (ResultSet rs =
           connection.getMetaData().getPrimaryKeys(DEFAULT_CATALOG, DEFAULT_SCHEMA, ALBUMS_TABLE)) {
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("TABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-        assertThat(rs.getString("TABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-        assertThat(rs.getString("TABLE_NAME"), is(equalTo(ALBUMS_TABLE)));
-        assertThat(rs.getString("COLUMN_NAME"), is(equalTo("SingerId")));
-        assertThat(rs.getInt("KEY_SEQ"), is(equalTo(1)));
-        assertThat(rs.getString("PK_NAME"), is(equalTo("PRIMARY_KEY")));
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("TABLE_CAT"), is(equalTo(DEFAULT_CATALOG)));
-        assertThat(rs.getString("TABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-        assertThat(rs.getString("TABLE_NAME"), is(equalTo(ALBUMS_TABLE)));
-        assertThat(rs.getString("COLUMN_NAME"), is(equalTo("AlbumId")));
-        assertThat(rs.getInt("KEY_SEQ"), is(equalTo(2)));
-        assertThat(rs.getString("PK_NAME"), is(equalTo("PRIMARY_KEY")));
-        assertThat(rs.next(), is(false));
+        assertTrue(rs.next());
+        assertEquals(DEFAULT_CATALOG, rs.getString("TABLE_CAT"));
+        assertEquals(DEFAULT_SCHEMA, rs.getString("TABLE_SCHEM"));
+        assertEquals(ALBUMS_TABLE, rs.getString("TABLE_NAME"));
+        assertEquals("SingerId", rs.getString("COLUMN_NAME"));
+        assertEquals(1, rs.getInt("KEY_SEQ"));
+        assertEquals("PRIMARY_KEY", rs.getString("PK_NAME"));
+        assertTrue(rs.next());
+        assertEquals(DEFAULT_CATALOG, rs.getString("TABLE_CAT"));
+        assertEquals(DEFAULT_SCHEMA, rs.getString("TABLE_SCHEM"));
+        assertEquals(ALBUMS_TABLE, rs.getString("TABLE_NAME"));
+        assertEquals("AlbumId", rs.getString("COLUMN_NAME"));
+        assertEquals(2, rs.getInt("KEY_SEQ"));
+        assertEquals("PRIMARY_KEY", rs.getString("PK_NAME"));
+        assertFalse(rs.next());
       }
     }
   }
 
   @Test
   public void testGetViews() throws SQLException {
-    assumeFalse("Emulator does not yet support views", EmulatorSpannerHelper.isUsingEmulator());
+    // assumeFalse("Emulator does not yet support views", EmulatorSpannerHelper.isUsingEmulator());
     try (Connection connection = createConnection(env, database)) {
       try (ResultSet rs = connection.getMetaData().getTables("", "", null, new String[] {"VIEW"})) {
         assertTrue(rs.next());
@@ -824,15 +786,15 @@ public class ITJdbcDatabaseMetaDataTest extends ITAbstractJdbcTest {
     try (Connection connection = createConnection(env, database)) {
       assertEquals("", connection.getSchema());
       try (ResultSet rs = connection.getMetaData().getSchemas()) {
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("TABLE_SCHEM"), is(equalTo(DEFAULT_SCHEMA)));
-        assertThat(rs.getString("TABLE_CATALOG"), is(equalTo(DEFAULT_CATALOG)));
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("TABLE_SCHEM"), is(equalTo("INFORMATION_SCHEMA")));
-        assertThat(rs.getString("TABLE_CATALOG"), is(equalTo(DEFAULT_CATALOG)));
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("TABLE_SCHEM"), is(equalTo("SPANNER_SYS")));
-        assertThat(rs.getString("TABLE_CATALOG"), is(equalTo(DEFAULT_CATALOG)));
+        assertTrue(rs.next());
+        assertEquals(DEFAULT_SCHEMA, rs.getString("TABLE_SCHEM"));
+        assertEquals(DEFAULT_CATALOG, rs.getString("TABLE_CATALOG"));
+        assertTrue(rs.next());
+        assertEquals("INFORMATION_SCHEMA", rs.getString("TABLE_SCHEM"));
+        assertEquals(DEFAULT_CATALOG, rs.getString("TABLE_CATALOG"));
+        assertTrue(rs.next());
+        assertEquals("SPANNER_SYS", rs.getString("TABLE_SCHEM"));
+        assertEquals(DEFAULT_CATALOG, rs.getString("TABLE_CATALOG"));
         assertFalse(rs.next());
       }
     }
@@ -882,9 +844,6 @@ public class ITJdbcDatabaseMetaDataTest extends ITAbstractJdbcTest {
       try (ResultSet rs =
           connection.getMetaData().getTables(DEFAULT_CATALOG, DEFAULT_SCHEMA, null, null)) {
         for (Table table : EXPECTED_TABLES) {
-          if (EmulatorSpannerHelper.isUsingEmulator() && table.name.equals("SingersView")) {
-            continue;
-          }
           assertTrue(rs.next());
           assertEquals(DEFAULT_CATALOG, rs.getString("TABLE_CAT"));
           assertEquals(DEFAULT_SCHEMA, rs.getString("TABLE_SCHEM"));
@@ -897,7 +856,7 @@ public class ITJdbcDatabaseMetaDataTest extends ITAbstractJdbcTest {
           assertNull(rs.getString("SELF_REFERENCING_COL_NAME"));
           assertNull(rs.getString("REF_GENERATION"));
         }
-        assertThat(rs.next(), is(false));
+        assertFalse(rs.next());
       }
     }
   }
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcReadWriteAutocommitTest.java b/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcReadWriteAutocommitTest.java
index 525ccbb..3db849c 100644
--- a/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcReadWriteAutocommitTest.java
+++ b/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcReadWriteAutocommitTest.java
@@ -16,9 +16,8 @@
 
 package com.google.cloud.spanner.jdbc.it;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import com.google.cloud.spanner.Database;
 import com.google.cloud.spanner.Dialect;
@@ -101,8 +100,8 @@ public class ITJdbcReadWriteAutocommitTest extends ITAbstractJdbcTest {
               "SHOW VARIABLE %sCOMMIT_TIMESTAMP",
               getDialect() == Dialect.POSTGRESQL ? "SPANNER." : ""));
       try (java.sql.ResultSet rs = statement.getResultSet()) {
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getTimestamp(1), is(notNullValue()));
+        assertTrue(rs.next());
+        assertNotNull(rs.getTimestamp(1));
       }
     }
   }
diff --git a/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcScriptTest.java b/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcScriptTest.java
index 8d8c0ff..9aeb5c7 100644
--- a/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcScriptTest.java
+++ b/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcScriptTest.java
@@ -16,10 +16,9 @@
 
 package com.google.cloud.spanner.jdbc.it;
 
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assume.assumeFalse;
 
 import com.google.cloud.spanner.Database;
@@ -313,8 +312,8 @@ public class ITJdbcScriptTest extends ITAbstractJdbcTest {
       statement.setQueryTimeout(1);
       statement.execute("SHOW VARIABLE STATEMENT_TIMEOUT");
       try (ResultSet rs = statement.getResultSet()) {
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("STATEMENT_TIMEOUT"), is(nullValue()));
+        assertTrue(rs.next());
+        assertNull(rs.getString("STATEMENT_TIMEOUT"));
       }
 
       // Now set a STATEMENT_TIMEOUT on the connection that is different from the query timeout of
@@ -323,8 +322,8 @@ public class ITJdbcScriptTest extends ITAbstractJdbcTest {
       statement.execute("SET STATEMENT_TIMEOUT='100ms'");
       statement.execute("SHOW VARIABLE STATEMENT_TIMEOUT");
       try (ResultSet rs = statement.getResultSet()) {
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("STATEMENT_TIMEOUT"), is(equalTo("100ms")));
+        assertTrue(rs.next());
+        assertEquals("100ms", rs.getString("STATEMENT_TIMEOUT"));
       }
 
       // Remove the statement timeout again, and verify that SHOW STATEMENT_TIMEOUT once again
@@ -332,8 +331,8 @@ public class ITJdbcScriptTest extends ITAbstractJdbcTest {
       statement.execute("SET STATEMENT_TIMEOUT=NULL");
       statement.execute("SHOW VARIABLE STATEMENT_TIMEOUT");
       try (ResultSet rs = statement.getResultSet()) {
-        assertThat(rs.next(), is(true));
-        assertThat(rs.getString("STATEMENT_TIMEOUT"), is(nullValue()));
+        assertTrue(rs.next());
+        assertNull(rs.getString("STATEMENT_TIMEOUT"));
       }
     }
   }