<commit_before>package io.featureflow.client;

import org.joda.time.DateTime;
import org.junit.Test;

import java.util.Arrays;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

import static org.junit.Assert.assertTrue;

/**
 * Created by oliver on 26/05/2016.
 */
public class FeatureFlowClientImplTestInt {

    FeatureFlowClient featureFlowClient;
    private CountDownLatch lock = new CountDownLatch(100);
    @Test
    public void testEvaluate() throws Exception {


        FeatureFlowConfig config = FeatureFlowConfig.builder()
              //  .withBaseUri(TestConfiguration.LOCAL_BASE_URL)
              //  .withStreamBaseUri(TestConfiguration.LOCAL_BASE_STREAM_URL)
                .withOffline(true)
                .withWaitForStartup(5000l)
                .build();

        FeatureFlowContext context = FeatureFlowContext.keyedContext("uniqueuserkey1")
                .withValue("tier", "silver")
                .withValue("age", 32)
                .withValue("signup_date", new DateTime(2017, 1, 1, 12, 0, 0, 0))
                .withValue("user_role", "pvt_tester")
                .withValue("name", "<NAME>")
                .withValue("email", "<EMAIL>")
                .build();


        FeatureFlowClient client = new FeatureFlowClient.Builder("<KEY>")
                .withFeatures(Arrays.asList(
                    new Feature("example-server-feature-q"),
                    new Feature("example-feature-2", Variant.off),
                    new Feature("example-feature-3", Arrays.asList(
                            new Variant("red", "Red Variant"),
                            new Variant("blue", "Blue Variant")
                    ),Variant.off)
                ))
                .withCallback(control -> {
                    System.out.println("Feature updated: " + control.getKey() + " - variant: " + control.evaluate(context) + "\n");
                    lock.countDown();
                })
                .withConfig(config).build();
        String evaluatedVariant = client.evaluate("example-feature", context).value();
        System.out.println(evaluatedVariant);
        lock.await(500000, TimeUnit.MILLISECONDS);

        System.out.println(client.evaluate("alpha", context));
    }
}<commit_msg>Latest JHipster for event server<commit_after>package io.featureflow.client;

import org.joda.time.DateTime;
import org.junit.Test;

import java.util.Arrays;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

import static org.junit.Assert.assertTrue;

/**
 * Created by oliver on 26/05/2016.
 */
public class FeatureFlowClientImplTestInt {

    FeatureFlowClient featureFlowClient;
    private CountDownLatch lock = new CountDownLatch(100);
    @Test
    public void testEvaluate() throws Exception {


        FeatureFlowConfig config = FeatureFlowConfig.builder()
              //  .withBaseUri(TestConfiguration.LOCAL_BASE_URL)
              //  .withStreamBaseUri(TestConfiguration.LOCAL_BASE_STREAM_URL)
                .withOffline(true)
                .withWaitForStartup(5000l)
                .build();

        FeatureFlowContext context = FeatureFlowContext.keyedContext("uniqueuserkey1")
                .withValue("tier", "silver")
                .withValue("age", 32)
                .withValue("signup_date", new DateTime(2017, 1, 1, 12, 0, 0, 0))
                .withValue("name", "<NAME>")
                .withValue("email", "<EMAIL>")
                .withValues("user_role", Arrays.asList("pvt_tester", "administrator"))
                .build();


        FeatureFlowClient client = new FeatureFlowClient.Builder("api-key")
                .withFeatures(Arrays.asList(
                    new Feature("example-server-feature-q"),
                    new Feature("example-feature-2", Variant.off),
                    new Feature("example-feature-3", Arrays.asList(
                            new Variant("red", "Red Variant"),
                            new Variant("blue", "Blue Variant")
                    ),Variant.off)
                ))
                .withCallback(control -> {
                    System.out.println("Feature updated: " + control.getKey() + " - variant: " + control.evaluate(context) + "\n");
                    lock.countDown();
                })
                .withConfig(config).build();
        String evaluatedVariant = client.evaluate("example-feature", context).value();
        System.out.println(evaluatedVariant);
        lock.await(500000, TimeUnit.MILLISECONDS);

        System.out.println(client.evaluate("alpha", context));
    }
}
{'fraction_non_alphanumeric': 0.12066724436741767, 'fraction_numerical': 0.016031195840554593, 'mean_word_length': 2.0862299465240643, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2277663', 'n_tokens_mistral': 1312, 'n_tokens_neox': 1205, 'n_words': 219}