@Test
public void MustInCorrectCompileQueryWhenCompileThrowException() throws Exception {

    QueryStatement statement = mock(QueryStatement.class);
    Writer bodyWriter = mock(Writer.class);
    when(bodyWriter.toString()).thenReturn("as");
    when(statement.getBodyWriter()).thenReturn(bodyWriter);
    when(statement.compile(connection)).thenThrow(new SQLException());
    try {
        testPostgresConnection.compileQuery(statement);
    } catch (StorageException e) {
        verify(statement).compile(connection);
        return;
    }
    assertTrue("Must throw exception", false);
}