DataSourceDecorator implements TestClassDecorator { @Override public boolean isConfigurationSupported(final ExecutionContext ctx) { return SqlDbConfiguration.isSupported(ctx.getDescriptor()); }  @Override int getPriority(); @Override void beforeAll(final TestInvocation invocation); @Override void afterAll(final TestInvocation invocation); @Override boolean isConfigurationSupported(final ExecutionContext ctx);  }
@Test public void testSupportedConfiguration() { final DataSourceDecorator decorator = new DataSourceDecorator(); final boolean isSupported = decorator.isConfigurationSupported(ctx); assertTrue(isSupported); }
@Test public void testUnsupportedConfiguration() { final Map<String, Object> props = new HashMap<>(); props.put("javax.persistence.jdbc.driver", "driver"); when(descriptor.getProperties()).thenReturn(props); final DataSourceDecorator decorator = new DataSourceDecorator(); final boolean isSupported = decorator.isConfigurationSupported(ctx); assertFalse(isSupported); }