JDBCBase { public synchronized final void teardown() { cleanupConnection(); initialized = false; } protected  JDBCBase(String url, String username, @Nullable String password); synchronized final void initialize(); synchronized final void teardown();  }
@Test public void shouldTeardownSuccessfully() throws Exception { initializeJDBCTestSubclass(); jdbcTestSubclass.teardown(); verify(mockConnection).close(); }
@Test public void shouldNoopOnSubsequentCallsIfTeardownCalledMultipleTimes() throws Exception { initializeJDBCTestSubclass(); jdbcTestSubclass.teardown(); jdbcTestSubclass.teardown(); jdbcTestSubclass.teardown(); jdbcTestSubclass.teardown(); verify(mockConnection, times(1)).close(); }