protected void assertTestCountryExtended(
      int i,
      BadgerEntity<CountryExtended> countryExtended,
      List<String> currencyIds,
      String baseName,
      String repeatedString11one,
      String repeatedString11two) {
    CountryExtended message = countryExtended.getMessage();
    assertEquals(baseName + i, message.getName());
    assertEquals(ALL_STRINGS_2_LIST.get(i).toUpperCase(), message.getAlpha2Code());
    assertEquals(ALL_STRINGS_3_LIST.get(i).toUpperCase(), message.getAlpha3Code());
    assertEquals(i, message.getNumericCode());
    assertEquals(currencyIds.get(i % currencyIds.size()), message.getCurrencyId());
    assertArrayEquals(
        new String[] {repeatedString11one + i, repeatedString11two + i},
        message.getRepeatedString11List().toArray(new String[0]));
    assertArrayEquals(
        new Long[] {Long.valueOf(i), Long.valueOf(i + 1)},
        message.getRepeatedUint6412List().toArray(new Long[0]));
    assertEquals(i, message.getI());
    assertEquals(Foo.valueOf((i % Foo.values().length) + 1), message.getFoo15());
    assertArrayEquals(
        new Foo[] {
          Foo.valueOf((i % Foo.values().length) + 1),
          Foo.valueOf(((i + 1) % Foo.values().length) + 1)
        },
        message.getRepeatedFoo16List().toArray(new Foo[0]));

    Nested nested17 = message.getNested17();
    assertNested(
        i, nested17, "aa", "aa", "ab", "aaa", "aaa", "aba", "aba", "aba", "abb", "ac", "ac", "bc");
    assertEquals(2, message.getRepeatedNested18Count());
    assertNested(
        i,
        message.getRepeatedNested18(0),
        "1aa",
        "1aa",
        "1ab",
        "1aaa",
        "1aaa",
        "1aba",
        "1aba",
        "1aba",
        "1abb",
        "1ac",
        "1ac",
        "1bc");
    assertNested(
        i,
        message.getRepeatedNested18(1),
        "2aa",
        "2aa",
        "2ab",
        "2aaa",
        "2aaa",
        "2aba",
        "2aba",
        "2aba",
        "2abb",
        "2ac",
        "2ac",
        "2bc");
  }
 protected List<BadgerEntity<CountryExtended>> getTestCountryExtendedsForCreate(
     List<String> currencyIds) {
   List<BadgerEntity<CountryExtended>> builder = new ArrayList<>();
   for (int i = 0; i < NUM_COUNTRY_EXTENDEDS; i++) {
     builder.add(
         getBadgerCore()
             .getBadgerEntity(
                 CountryExtended.newBuilder()
                     .setName("United States" + i)
                     .setAlpha2Code(ALL_STRINGS_2_LIST.get(i))
                     .setAlpha3Code(ALL_STRINGS_3_LIST.get(i))
                     .setNumericCode(i)
                     .setCurrencyId(currencyIds.get(i % currencyIds.size()))
                     .addRepeatedString11("a" + i)
                     .addRepeatedString11("b" + i)
                     .addRepeatedUint6412(i)
                     .addRepeatedUint6412(i + 1)
                     .setI(i)
                     .setFoo15(Foo.valueOf((i % Foo.values().length) + 1))
                     .addRepeatedFoo16(Foo.valueOf((i % Foo.values().length) + 1))
                     .addRepeatedFoo16(Foo.valueOf(((i + 1) % Foo.values().length) + 1))
                     .setNested17(
                         Nested.newBuilder()
                             .setString1("aa" + i)
                             .setUint642(i)
                             .addRepeatedString3("aa" + i)
                             .addRepeatedString3("ab" + i)
                             .addRepeatedUint644(i)
                             .addRepeatedUint644(i + 1)
                             .setNestedNested5(
                                 NestedNested.newBuilder()
                                     .setString1("aaa" + i)
                                     .setUint642(i)
                                     .addRepeatedString3("aaa" + i)
                                     .addRepeatedString3("aba" + i)
                                     .addRepeatedUint644(i)
                                     .addRepeatedUint644(i + 1)
                                     .build())
                             .addRepeatedNestedNested6(
                                 NestedNested.newBuilder()
                                     .setString1("aba" + i)
                                     .setUint642(i)
                                     .addRepeatedString3("aba" + i)
                                     .addRepeatedString3("abb" + i)
                                     .addRepeatedUint644(i)
                                     .addRepeatedUint644(i + 1)
                                     .build())
                             .addRepeatedNestedNested6(
                                 NestedNested.newBuilder()
                                     .setString1("ac" + i)
                                     .setUint642(i)
                                     .addRepeatedString3("ac" + i)
                                     .addRepeatedString3("bc" + i)
                                     .addRepeatedUint644(i)
                                     .addRepeatedUint644(i + 1)
                                     .build()))
                     .addRepeatedNested18(
                         Nested.newBuilder()
                             .setString1("1aa" + i)
                             .setUint642(i)
                             .addRepeatedString3("1aa" + i)
                             .addRepeatedString3("1ab" + i)
                             .addRepeatedUint644(i)
                             .addRepeatedUint644(i + 1)
                             .setNestedNested5(
                                 NestedNested.newBuilder()
                                     .setString1("1aaa" + i)
                                     .setUint642(i)
                                     .addRepeatedString3("1aaa" + i)
                                     .addRepeatedString3("1aba" + i)
                                     .addRepeatedUint644(i)
                                     .addRepeatedUint644(i + 1)
                                     .build())
                             .addRepeatedNestedNested6(
                                 NestedNested.newBuilder()
                                     .setString1("1aba" + i)
                                     .setUint642(i)
                                     .addRepeatedString3("1aba" + i)
                                     .addRepeatedString3("1abb" + i)
                                     .addRepeatedUint644(i)
                                     .addRepeatedUint644(i + 1)
                                     .build())
                             .addRepeatedNestedNested6(
                                 NestedNested.newBuilder()
                                     .setString1("1ac" + i)
                                     .setUint642(i)
                                     .addRepeatedString3("1ac" + i)
                                     .addRepeatedString3("1bc" + i)
                                     .addRepeatedUint644(i)
                                     .addRepeatedUint644(i + 1)
                                     .build()))
                     .addRepeatedNested18(
                         Nested.newBuilder()
                             .setString1("2aa" + i)
                             .setUint642(i)
                             .addRepeatedString3("2aa" + i)
                             .addRepeatedString3("2ab" + i)
                             .addRepeatedUint644(i)
                             .addRepeatedUint644(i + 1)
                             .setNestedNested5(
                                 NestedNested.newBuilder()
                                     .setString1("2aaa" + i)
                                     .setUint642(i)
                                     .addRepeatedString3("2aaa" + i)
                                     .addRepeatedString3("2aba" + i)
                                     .addRepeatedUint644(i)
                                     .addRepeatedUint644(i + 1)
                                     .build())
                             .addRepeatedNestedNested6(
                                 NestedNested.newBuilder()
                                     .setString1("2aba" + i)
                                     .setUint642(i)
                                     .addRepeatedString3("2aba" + i)
                                     .addRepeatedString3("2abb" + i)
                                     .addRepeatedUint644(i)
                                     .addRepeatedUint644(i + 1)
                                     .build())
                             .addRepeatedNestedNested6(
                                 NestedNested.newBuilder()
                                     .setString1("2ac" + i)
                                     .setUint642(i)
                                     .addRepeatedString3("2ac" + i)
                                     .addRepeatedString3("2bc" + i)
                                     .addRepeatedUint644(i)
                                     .addRepeatedUint644(i + 1)
                                     .build()))
                     .build()));
   }
   return builder;
 }