OpenEjbManagedDatasourceAccessor implements DatasourceAccessor { @Override public boolean canMap(Object resource) { if ("org.apache.openejb.resource.jdbc.managed.local.ManagedDataSource" .equals(resource.getClass().getName())) { Object wrapped = unwrap(resource); return wrapped instanceof DataSourceProxy && wrapped instanceof PoolConfiguration; } return false; }  @Override DataSourceInfo getInfo(Object resource); @Override boolean reset(Object resource); @Override boolean canMap(Object resource);  }
@Disabled @Test public void canMapTest() { Assertions.assertTrue(accessor.canMap(source)); }
@Test public void cannotMapTest() { Assertions.assertFalse(accessor.canMap(badSource)); }