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);
  }
}

@@ -96,16 +96,63 @@
 tThat;%0A%0A
+import com.hubspot.jinjava.lib.tag.IncludeTag;%0A
 import c
@@ -1137,19 +1137,23 @@
 clazz = 
-Raw
+Include
 Tag.clas

Fix test after adding raw to skip list