@Override
  public OrganizedImports organizeImports(List<Import> imports) {
    OrganizedImports organized = new OrganizedImports();

    // Group into static and non-static.
    Map<Boolean, List<Import>> partionedByStatic =
        imports.stream().collect(Collectors.partitioningBy(Import::isStatic));

    for (Boolean key : order.groupOrder()) {
      organizePartition(organized, partionedByStatic.get(key));
    }

    return organized;
  }
@Test
  public void staticLastOrdering() {
    AndroidImportOrganizer organizer = new AndroidImportOrganizer(StaticOrder.STATIC_LAST);
    ImportOrganizer.OrganizedImports organized = organizer.organizeImports(IMPORTS);
    assertThat(organized.asImportBlock())
        .isEqualTo(
            "import android.foo;\n"
                + "\n"
                + "import com.android.blah;\n"
                + "\n"
                + "import net.wilma;\n"
                + "\n"
                + "import unknown.barney;\n"
                + "import unknown.fred;\n"
                + "\n"
                + "import java.ping;\n"
                + "\n"
                + "import javax.pong;\n"
                + "\n"
                + "import static android.foo.bar;\n"
                + "\n"
                + "import static com.android.blah.blah;\n"
                + "\n"
                + "import static net.wilma.flintstone;\n"
                + "\n"
                + "import static unknown.fred.flintstone;\n"
                + "\n"
                + "import static java.ping.pong;\n"
                + "\n"
                + "import static javax.pong.ping;\n");
  }