  @Test
  public void testDoPreview() throws DatasourceServiceException {

    doReturn( true ).when( dswService ).hasDataAccessPermission();
    SerializedResultSet result = dswService.doPreview( CONNECTION_NAME, VALID_QUERY, PREVIEW_LIMIT );
    try {
      verify( dswService ).executeQuery( "[connection &#25509;&#32154; &lt;;&gt;!@#$%^&amp;*()_-=+.,]",
        VALID_QUERY, PREVIEW_LIMIT );
    } catch ( Exception e ) {
      e.printStackTrace();
    }
    assertNotNull( result );
    assertArrayEquals( columns, result.getColumns() );
    assertArrayEquals( columnTypes, result.getColumnTypes() );
  }