@Test
public void shouldThrowStorageExceptionIfStoreCannotBeInitializedBecauseAddDatabaseCreateStatementsToBatchThrows() throws Exception {

    when(mockDriver.connect(anyString(), any(Properties.class))).thenReturn(mockConnection);
    when(mockConnection.createStatement()).thenReturn(mockStatement);
    doThrow(new IllegalArgumentException("database broken")).when(jdbcTestSubclass).addDatabaseCreateStatementsToBatch(mockStatement);
    assertThatInitializeThrows(IllegalArgumentException.class);
    InOrder inOrder = inOrder(mockStatement, mockConnection);
    inOrder.verify(mockStatement).close();
    inOrder.verify(mockConnection).rollback();
    inOrder.verify(mockConnection).close();
}