<commit_before>package com.hubspot.jinjava.lib.tag.eager;

import static org.assertj.core.api.Assertions.assertThat;

import com.hubspot.jinjava.lib.tag.RawTag;
import com.hubspot.jinjava.lib.tag.Tag;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import org.junit.Test;

public class EagerTagFactoryTest {

  @Test
  public void itGetsEagerTagDecoratorForOverrides() {
    Set<EagerTagDecorator<?>> eagerTagDecoratorSet = EagerTagFactory
      .EAGER_TAG_OVERRIDES.keySet()
      .stream()
      .map(EagerTagFactory::getEagerTagDecorator)
      .filter(Optional::isPresent)
      .map(Optional::get)
      .collect(Collectors.toSet());
    assertThat(eagerTagDecoratorSet.size())
      .isEqualTo(EagerTagFactory.EAGER_TAG_OVERRIDES.keySet().size());
    assertThat(
        eagerTagDecoratorSet
          .stream()
          .map(e -> e.getTag().getClass())
          .collect(Collectors.toSet())
      )
      .isEqualTo(EagerTagFactory.EAGER_TAG_OVERRIDES.keySet());
  }

  @Test
  public void itGetsEagerTagDecoratorForNonOverride() {
    Class<? extends Tag> clazz = RawTag.class;
    Optional<? extends EagerTagDecorator<? extends Tag>> maybeEagerGenericTag = EagerTagFactory.getEagerTagDecorator(
      clazz
    );
    assertThat(maybeEagerGenericTag).isPresent();
    assertThat(maybeEagerGenericTag.get()).isInstanceOf(EagerGenericTag.class);
    assertThat(maybeEagerGenericTag.get().getTag()).isInstanceOf(clazz);
  }
}
<commit_msg>Fix test after adding raw to skip list<commit_after>package com.hubspot.jinjava.lib.tag.eager;

import static org.assertj.core.api.Assertions.assertThat;

import com.hubspot.jinjava.lib.tag.IncludeTag;
import com.hubspot.jinjava.lib.tag.RawTag;
import com.hubspot.jinjava.lib.tag.Tag;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import org.junit.Test;

public class EagerTagFactoryTest {

  @Test
  public void itGetsEagerTagDecoratorForOverrides() {
    Set<EagerTagDecorator<?>> eagerTagDecoratorSet = EagerTagFactory
      .EAGER_TAG_OVERRIDES.keySet()
      .stream()
      .map(EagerTagFactory::getEagerTagDecorator)
      .filter(Optional::isPresent)
      .map(Optional::get)
      .collect(Collectors.toSet());
    assertThat(eagerTagDecoratorSet.size())
      .isEqualTo(EagerTagFactory.EAGER_TAG_OVERRIDES.keySet().size());
    assertThat(
        eagerTagDecoratorSet
          .stream()
          .map(e -> e.getTag().getClass())
          .collect(Collectors.toSet())
      )
      .isEqualTo(EagerTagFactory.EAGER_TAG_OVERRIDES.keySet());
  }

  @Test
  public void itGetsEagerTagDecoratorForNonOverride() {
    Class<? extends Tag> clazz = IncludeTag.class;
    Optional<? extends EagerTagDecorator<? extends Tag>> maybeEagerGenericTag = EagerTagFactory.getEagerTagDecorator(
      clazz
    );
    assertThat(maybeEagerGenericTag).isPresent();
    assertThat(maybeEagerGenericTag.get()).isInstanceOf(EagerGenericTag.class);
    assertThat(maybeEagerGenericTag.get().getTag()).isInstanceOf(clazz);
  }
}

{'fraction_non_alphanumeric': 0.11892247043363995, 'fraction_numerical': 0.0, 'mean_word_length': 4.187393526405452, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '2406424', 'n_tokens_mistral': 1029, 'n_tokens_neox': 1030, 'n_words': 133}