// Path: flagz-java/src/test/java/org/flagz/testclasses/StaticFlags.java
// public class StaticFlags {
// 
//   @FlagInfo(help = "for testing of resolution with no name argument")
//   public static final Flag<Integer> testFieldNameFlag = Flagz.valueOf(0);
// 
//   @FlagInfo(name = "test_alt_name", help = "for testing of resolution with alt name", altName = "t_alt")
//   public static final Flag<String> testAltNameFlag = Flagz.valueOf("my_alt");
// 
//   @FlagInfo(name = "test_flag_full_name", help = "for testing of resolution with full name")
//   public static final Flag<Long> testFullNameFlag = Flagz.valueOf(0L);
// 
//   @FlagInfo(name = "test_flag_private_static", help = "for testing of resolution of private static fields")
//   private static final Flag<Long> testPrivateStaticFlag = Flagz.valueOf(0L);
// 
//   @FlagInfo(name = "test_flag_public_static", help = "for testing of resolution of public static fields")
//   public static final Flag<Long> testPublicStaticFlag = Flagz.valueOf(0L);
// 
//   @FlagInfo(name = "test_flag_non_static", help = "for validating that we won't see non static fields")
//   private final Flag<Long> testInvisibleNonStaticFlag = Flagz.valueOf(0L);
// 
// 
//   public static Flag<Long> testPrivateStaticFlagAccessor() {
//     return testPrivateStaticFlag;
//   }
// 
//   @SuppressWarnings("unchecked")
//   public static void resetToDefaults() {
//     List<Flag<?>> list = ImmutableList.of(
//         testFieldNameFlag, testAltNameFlag, testFullNameFlag, testPrivateStaticFlag, testPublicStaticFlag);
//     for (Flag f : list) {
//       f.accept(f.defaultValue());
//     }
//   }
// }


import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import org.flagz.testclasses.StaticFlags;
import org.junit.Test;
import java.util.List;
import java.util.Set;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
    }
  }

  ;

  static class ContainerTwo {
    @FlagInfo(name = "test_flag_obj_public_two", help = "")
    public final Flag<Long> testPublicFlag = Flagz.valueOf(999L);
  }

  ;

  static class ContainerClashingWithStatic {
    @FlagInfo(name = "test_flag_public_static", help = "")
    public final Flag<Long> testStaticClash = Flagz.valueOf(999L);
  }

  ;

  private ContainerOne one = new ContainerOne();
  private ContainerTwo two = new ContainerTwo();
  private ContainerClashingWithStatic clashing = new ContainerClashingWithStatic();
  private Set<Object> goodContainers = ImmutableSet.of(one, two);
  private Set<Object> clashingContainers = ImmutableSet.of(one, two, clashing);


  @Test
  public void testGeneric_FieldNameResolution() {
    String[] args = {"--testFieldNameFlag=101010"};
    Flagz.parse(args, EMPTY_PACKAGE_PREFIXES, goodContainers);
// Path: flagz-java/src/test/java/org/flagz/testclasses/StaticFlags.java
// public class StaticFlags {
// 
//   @FlagInfo(help = "for testing of resolution with no name argument")
//   public static final Flag<Integer> testFieldNameFlag = Flagz.valueOf(0);
// 
//   @FlagInfo(name = "test_alt_name", help = "for testing of resolution with alt name", altName = "t_alt")
//   public static final Flag<String> testAltNameFlag = Flagz.valueOf("my_alt");
// 
//   @FlagInfo(name = "test_flag_full_name", help = "for testing of resolution with full name")
//   public static final Flag<Long> testFullNameFlag = Flagz.valueOf(0L);
// 
//   @FlagInfo(name = "test_flag_private_static", help = "for testing of resolution of private static fields")
//   private static final Flag<Long> testPrivateStaticFlag = Flagz.valueOf(0L);
// 
//   @FlagInfo(name = "test_flag_public_static", help = "for testing of resolution of public static fields")
//   public static final Flag<Long> testPublicStaticFlag = Flagz.valueOf(0L);
// 
//   @FlagInfo(name = "test_flag_non_static", help = "for validating that we won't see non static fields")
//   private final Flag<Long> testInvisibleNonStaticFlag = Flagz.valueOf(0L);
// 
// 
//   public static Flag<Long> testPrivateStaticFlagAccessor() {
//     return testPrivateStaticFlag;
//   }
// 
//   @SuppressWarnings("unchecked")
//   public static void resetToDefaults() {
//     List<Flag<?>> list = ImmutableList.of(
//         testFieldNameFlag, testAltNameFlag, testFullNameFlag, testPrivateStaticFlag, testPublicStaticFlag);
//     for (Flag f : list) {
//       f.accept(f.defaultValue());
//     }
//   }
// }


// Path: flagz-java/src/test/java/org/flagz/FlagFieldScannerTest.java
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import org.flagz.testclasses.StaticFlags;
import org.junit.Test;
import java.util.List;
import java.util.Set;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

    }
  }

  ;

  static class ContainerTwo {
    @FlagInfo(name = "test_flag_obj_public_two", help = "")
    public final Flag<Long> testPublicFlag = Flagz.valueOf(999L);
  }

  ;

  static class ContainerClashingWithStatic {
    @FlagInfo(name = "test_flag_public_static", help = "")
    public final Flag<Long> testStaticClash = Flagz.valueOf(999L);
  }

  ;

  private ContainerOne one = new ContainerOne();
  private ContainerTwo two = new ContainerTwo();
  private ContainerClashingWithStatic clashing = new ContainerClashingWithStatic();
  private Set<Object> goodContainers = ImmutableSet.of(one, two);
  private Set<Object> clashingContainers = ImmutableSet.of(one, two, clashing);


  @Test
  public void testGeneric_FieldNameResolution() {
    String[] args = {"--testFieldNameFlag=101010"};
    Flagz.parse(args, EMPTY_PACKAGE_PREFIXES, goodContainers);
    assertThat(StaticFlags.testFieldNameFlag.get(), is(101010));