<commit_before>package jpower.core.test;

import org.junit.Test;
import static org.junit.Assert.*;

import jpower.core.Wrapper;
import jpower.core.GotoContext;

public class GotoContextTest
{
   @Test
   public void testExecution()
   {
      GotoContext ctx = GotoContext.make();
      Wrapper<Integer> number = Wrapper.of(0);
      ctx.define("increment", () -> number.set(number.get() + 1));
      ctx.run("increment");
      assertEquals(1, number.get().intValue());
   }
}<commit_msg>Core: GotoContext - Add test for Chaining<commit_after>package jpower.core.test;

import org.junit.Test;
import static org.junit.Assert.*;

import jpower.core.Wrapper;
import jpower.core.GotoContext;

public class GotoContextTest
{
   @Test
   public void testExecution()
   {
      GotoContext ctx = GotoContext.make();
      Wrapper<Integer> number = Wrapper.of(0);
      ctx.define("increment", () -> number.set(number.get() + 1));
      ctx.run("increment");
      assertEquals(1, number.get().intValue());
   }

   @Test
   public void testChaining()
   {
      GotoContext ctx = GotoContext.make();
      Wrapper<Integer> number = Wrapper.of(0);
      ctx.define("increment", () -> number.set(number.get() + 1));
      ctx.define("decrement", () -> number.set(number.get() - 1));
      ctx.run("increment")
         .run("decrement");
      assertEquals(0, number.get().intValue());
   }
}
{'fraction_non_alphanumeric': 0.16040462427745664, 'fraction_numerical': 0.0072254335260115606, 'mean_word_length': 3.369085173501577, 'pattern_counts': {'":': 0, '<': 6, '<?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': '6271707', 'n_tokens_mistral': 451, 'n_tokens_neox': 441, 'n_words': 85}