### Question:
AssignmentsEditorWidget extends Composite implements HasValue<String> { protected String formatDataTypes(final List<String> dataTypes) { StringBuilder sb = new StringBuilder(); if (dataTypes != null && !dataTypes.isEmpty()) { List<String> formattedDataTypes = new ArrayList<>(dataTypes.size()); for (String dataType : dataTypes) { formattedDataTypes.add(StringUtils.createDataTypeDisplayName(dataType) + ":" + dataType); } Collections.sort(formattedDataTypes); for (String formattedDataType : formattedDataTypes) { sb.append(formattedDataType).append(','); } sb.setLength(sb.length() - 1); } return sb.toString(); } AssignmentsEditorWidget(final BPMNDefinition bpmnModel,
                            final String assignmentsInfo,
                            final boolean hasInputVars,
                            final boolean isSingleInputVar,
                            final boolean hasOutputVars,
                            final boolean isSingleOutputVar,
                            final SessionManager canvasSessionManager,
                            final GraphUtils graphUtils);  AssignmentsEditorWidget(); @EventHandler("assignmentsButton") void onClickAssignmentsButton(final ClickEvent clickEvent); @EventHandler("assignmentsTextBox") void onClickAssignmentsTextBox(final ClickEvent clickEvent); @Override String getValue(); @Override void setValue(final String value); @Override void setValue(final String value,
                         final boolean fireEvents); @Override HandlerRegistration addValueChangeHandler(final ValueChangeHandler<String> handler); void showAssignmentsDialog(); void showDataIOEditor(final String datatypes); void setReadOnly(final boolean readOnly); static final String DEFAULT_IGNORED_PROPERTY_NAMES; }### Answer:
@Test public void testFormatDataTypes() { String formattedDataTypes = widget.formatDataTypes(DATATYPES); assertEquals(FORMATTED_DATATYPES, formattedDataTypes); }