class MongoClientDecorator implements TestClassDecorator {

    @Override
    public void afterAll(final TestInvocation invocation) throws Exception {
        final ExecutionContext context = invocation.getContext();
        final MongoClient client = (MongoClient) context.getData(Constants.KEY_MONGO_CLIENT);
        context.storeData(Constants.KEY_MONGO_CLIENT, null);
        client.close();
    }

}