ArgumentBuilder { public ArgumentConfig build() { ArgumentConfig argumentConfig = new ArgumentConfig(); argumentConfig.setIndex(index); argumentConfig.setType(type); argumentConfig.setCallback(callback); return argumentConfig; }  ArgumentBuilder index(Integer index); ArgumentBuilder type(String type); ArgumentBuilder callback(Boolean callback); ArgumentConfig build();  }
@Test void build() { ArgumentBuilder builder = new ArgumentBuilder(); builder.index(1).type("int").callback(true); ArgumentConfig argument1 = builder.build(); ArgumentConfig argument2 = builder.build(); Assertions.assertTrue(argument1.isCallback()); Assertions.assertEquals("int", argument1.getType()); Assertions.assertEquals(1, argument1.getIndex()); Assertions.assertNotSame(argument1, argument2); }