### Question:
DataTypeConstraintView implements DataTypeConstraint.View { @PostConstruct public void setup() { constraintsTooltip.setAttribute("title", translationService.format(DataTypeConstraintView_ConstraintsTooltip)); setupTooltip(properties().getJavaScriptObject()); } @Inject  DataTypeConstraintView(final HTMLAnchorElement constraintsAnchorContainer,
                                  final HTMLDivElement constraintsLabelContainer,
                                  final @Named("span") HTMLElement constraintsAnchorText,
                                  final @Named("span") HTMLElement constraintsLabelText,
                                  final @Named("span") HTMLElement constraintsTooltip,
                                  final TranslationService translationService); @Override void init(final DataTypeConstraint presenter); @PostConstruct void setup(); @EventHandler("constraints-anchor-container") void onConstraintsClick(final ClickEvent e); @Override void showAnchor(); @Override void hideAnchor(); @Override void setText(final String text); @Override void enable(); @Override void disable();  }### Answer:
@Test public void testSetup() { final String constraintsTooltipText = "ConstraintsTooltip"; final JSONObject properties = mock(JSONObject.class); final JavaScriptObject propertiesJSONObject = mock(JavaScriptObject.class); doReturn(properties).when(view).properties(); when(properties.getJavaScriptObject()).thenReturn(propertiesJSONObject); when(translationService.format(DataTypeConstraintView_ConstraintsTooltip)).thenReturn(constraintsTooltipText); view.setup(); verify(constraintsTooltip).setAttribute("title", constraintsTooltipText); verify(view).setupTooltip(propertiesJSONObject); }