code: private static Transition getTransitionTwoGroups(Collection<String> neighborGroups)
      {
          final Iterator<String> iterator = new HashSet<>(neighborGroups).iterator();
          final String groupIn = iterator.next();
          final String groupOut = iterator.next();
          final TransitionType type = getTransitionType(groupIn, neighborGroups);
  
          return new Transition(type, groupIn, groupOut);
      }
docs: Get the tile transition between two groups.
  
  @param neighborGroups The neighbor groups (must contain two groups).
  @return The tile transition.