TomcatJdbcPoolDatasourceAccessor implements DatasourceAccessor { @Override public boolean canMap(Object resource) { return "org.apache.tomcat.jdbc.pool.DataSource".equals(resource.getClass().getName()) && resource instanceof DataSource; }  @Override DataSourceInfo getInfo(Object resource); @Override boolean reset(Object resource); @Override boolean canMap(Object resource);  }
@Test public void canMapTest() { Assertions.assertTrue(accessor.canMap(source)); }
@Test public void cannotMapTest() { Assertions.assertFalse(accessor.canMap(badSource)); }