### Question:
RelationDefaultValueUtilities { public static String getNewColumnName(final Relation relation) { return PREFIX + DefaultValueUtilities.getMaxUnusedIndex(relation.getColumn().stream() .filter(informationItem -> informationItem != null) .map(InformationItem::getName) .filter(name -> name != null) .map(Name::getValue) .collect(Collectors.toList()), PREFIX); }  static String getNewColumnName(final Relation relation); static final String PREFIX; }### Answer:
@Test public void testGetNewColumnName() { final InformationItem informationItem1 = new InformationItem(); relation.getColumn().add(informationItem1); informationItem1.getName().setValue(RelationDefaultValueUtilities.getNewColumnName(relation)); assertThat(informationItem1.getName().getValue()).isEqualTo(RelationDefaultValueUtilities.PREFIX + "1"); final InformationItem informationItem2 = new InformationItem(); relation.getColumn().add(informationItem2); informationItem2.getName().setValue(RelationDefaultValueUtilities.getNewColumnName(relation)); assertThat(informationItem2.getName().getValue()).isEqualTo(RelationDefaultValueUtilities.PREFIX + "2"); }
@Test public void testGetNewColumnNameWithExistingColumns() { final InformationItem informationItem1 = new InformationItem(); relation.getColumn().add(informationItem1); informationItem1.getName().setValue("column"); final InformationItem informationItem2 = new InformationItem(); relation.getColumn().add(informationItem2); informationItem2.getName().setValue(RelationDefaultValueUtilities.getNewColumnName(relation)); assertThat(informationItem2.getName().getValue()).isEqualTo(RelationDefaultValueUtilities.PREFIX + "1"); }
@Test public void testGetNewColumnNameWithDeletion() { final InformationItem informationItem1 = new InformationItem(); relation.getColumn().add(informationItem1); informationItem1.getName().setValue(RelationDefaultValueUtilities.getNewColumnName(relation)); assertThat(informationItem1.getName().getValue()).isEqualTo(RelationDefaultValueUtilities.PREFIX + "1"); final InformationItem informationItem2 = new InformationItem(); relation.getColumn().add(informationItem2); informationItem2.getName().setValue(RelationDefaultValueUtilities.getNewColumnName(relation)); assertThat(informationItem2.getName().getValue()).isEqualTo(RelationDefaultValueUtilities.PREFIX + "2"); relation.getColumn().remove(informationItem1); final InformationItem informationItem3 = new InformationItem(); relation.getColumn().add(informationItem3); informationItem3.getName().setValue(RelationDefaultValueUtilities.getNewColumnName(relation)); assertThat(informationItem3.getName().getValue()).isEqualTo(RelationDefaultValueUtilities.PREFIX + "3"); }