class MongoClientDecorator implements TestClassDecorator {

    @Override
    public void beforeAll(final TestInvocation invocation) throws Exception {
        final ExecutionContext context = invocation.getContext();
        final Configuration configuration = configurationRegistry.getConfiguration(context.getDescriptor());

        final MongoClient client = new MongoClient(configuration.getServerAddresses(), configuration.getCredentials(),
                configuration.getClientOptions());

        context.storeData(Constants.KEY_MONGO_CLIENT, client);
    }

}