class Neo4JDbDecorator implements TestMethodDecorator {

    @Override
    public void beforeTest(final TestInvocation invocation) throws Exception {
        final ExecutionContext context = invocation.getContext();

        final Neo4JDbFeatureExecutor dbFeatureExecutor = new Neo4JDbFeatureExecutor(invocation.getFeatureResolver(),
                context.getDescriptor().getClasses());
        final DataSource ds = (DataSource) context.getData(Constants.KEY_DATA_SOURCE);
        final Connection connection = ds.getConnection();
        connection.setAutoCommit(false);
        context.storeData(Constants.KEY_CONNECTION, connection);
        dbFeatureExecutor.executeBeforeTest(connection);
    }

}