### Question:
ETLAuthConnection { public void validateConnection(String accessToken, String imsOrg) throws ConnectorSDKException{ try { CatalogService catalogService = CatalogFactory.getCatalogService(); catalogService.getBatches(imsOrg, accessToken, new HashMap<>(), CatalogAPIStrategy.ONCE); }catch (Exception ex){ throw new ConnectorSDKException("Please check the connection parameters imsOrg, catalog end point, access token : " + ex.getMessage(), ex); } }  void validateConnection(String accessToken, String imsOrg);  }### Answer:
@Test public void testFailureValidConnection() throws Exception { ETLAuthConnection etlAuthConnection = new ETLAuthConnection(); getStringAsHttpOutputStream(""); try { etlAuthConnection.validateConnection( "accessToken", "imsOrg"); assertTrue(false); }catch (Exception ex){ assertTrue(ex instanceof ConnectorSDKException); } }
@Test public void testEmptyDataset() throws Exception { ETLAuthConnection etlAuthConnection = new ETLAuthConnection(); getStringAsHttpOutputStream(new JSONObject().toString()); try { etlAuthConnection.validateConnection( "accessToken", "imsOrg"); assertTrue(false); }catch (Exception ex){ assertTrue(ex instanceof ConnectorSDKException); } }