PentahoPoolDataSourceConnectionProvider implements ConnectionProvider { public Object getConnectionHash() { final ArrayList<Object> list = new ArrayList<Object>(); list.add( getClass().getName() ); list.add( name ); list.add( username ); return list; } PentahoPoolDataSourceConnectionProvider(); @Override Connection createConnection( final String user, final String password ); String getName(); void setName( final String name ); String getUsername(); void setUsername( final String username ); String getPassword(); void setPassword( final String password ); Object getConnectionHash();  }
@Test public void testGetConnectionHash() throws Exception { provider.setName( "mysql" ); provider.setUsername( "username" ); ArrayList result = (ArrayList) provider.getConnectionHash(); Assert.assertEquals( 3, result.size() ); Assert.assertEquals( "org.pentaho.reporting.platform.plugin.connection.PentahoPoolDataSourceConnectionProvider", result.get( 0 ) ); Assert.assertEquals( "mysql", result.get( 1 ) ); Assert.assertEquals( "username", result.get( 2 ) ); }