### Question:
InvocationDefaultValueUtilities { public static String getNewParameterName(final Invocation invocation) { return PREFIX + DefaultValueUtilities.getMaxUnusedIndex(invocation.getBinding().stream() .map(Binding::getParameter) .filter(informationItem -> informationItem != null) .map(InformationItem::getName) .filter(name -> name != null) .map(Name::getValue) .collect(Collectors.toList()), PREFIX); }  static String getNewParameterName(final Invocation invocation); static final String PREFIX; }### Answer:
@Test public void testGetNewParameterName() { final Binding binding1 = new Binding() {{ setParameter(new InformationItem()); }}; invocation.getBinding().add(binding1); binding1.getParameter().getName().setValue(InvocationDefaultValueUtilities.getNewParameterName(invocation)); assertThat(binding1.getParameter().getName().getValue()).isEqualTo(InvocationDefaultValueUtilities.PREFIX + "1"); final Binding binding2 = new Binding() {{ setParameter(new InformationItem()); }}; invocation.getBinding().add(binding2); binding2.getParameter().getName().setValue(InvocationDefaultValueUtilities.getNewParameterName(invocation)); assertThat(binding2.getParameter().getName().getValue()).isEqualTo(InvocationDefaultValueUtilities.PREFIX + "2"); }
@Test public void testGetNewParameterNameWithExistingParameters() { final Binding binding1 = new Binding() {{ setParameter(new InformationItem()); }}; invocation.getBinding().add(binding1); binding1.getParameter().getName().setValue("binding"); final Binding binding2 = new Binding() {{ setParameter(new InformationItem()); }}; invocation.getBinding().add(binding2); binding2.getParameter().getName().setValue(InvocationDefaultValueUtilities.getNewParameterName(invocation)); assertThat(binding2.getParameter().getName().getValue()).isEqualTo(InvocationDefaultValueUtilities.PREFIX + "1"); }
@Test public void testGetNewParameterNameWithDeletion() { final Binding binding1 = new Binding() {{ setParameter(new InformationItem()); }}; invocation.getBinding().add(binding1); binding1.getParameter().getName().setValue(InvocationDefaultValueUtilities.getNewParameterName(invocation)); assertThat(binding1.getParameter().getName().getValue()).isEqualTo(InvocationDefaultValueUtilities.PREFIX + "1"); final Binding binding2 = new Binding() {{ setParameter(new InformationItem()); }}; invocation.getBinding().add(binding2); binding2.getParameter().getName().setValue(InvocationDefaultValueUtilities.getNewParameterName(invocation)); assertThat(binding2.getParameter().getName().getValue()).isEqualTo(InvocationDefaultValueUtilities.PREFIX + "2"); invocation.getBinding().remove(binding1); final Binding binding3 = new Binding() {{ setParameter(new InformationItem()); }}; invocation.getBinding().add(binding3); binding3.getParameter().getName().setValue(InvocationDefaultValueUtilities.getNewParameterName(invocation)); assertThat(binding3.getParameter().getName().getValue()).isEqualTo(InvocationDefaultValueUtilities.PREFIX + "3"); }