### Question:
ServerInfoServiceImpl implements ServerInfoService, Diagnostic { @Override public Map<DiagnosticAttribute, DiagnosticCallback> getDiagnosticData() { return new DiagnosticAttributeBuilder() .addDiagnosticAttribute(DiagnosticAttributeBuilder.VERSION, new DiagnosticCallback<String>() { @Override public String getDiagnosticAttributeValue() { return getServerInfo().getVersion(); } }) .addDiagnosticAttribute(DiagnosticAttributeBuilder.SOURCE_EDITION, new DiagnosticCallback<String>() { @Override public String getDiagnosticAttributeValue() { return getServerInfo().getEdition().toString(); } }) .addDiagnosticAttribute(DiagnosticAttributeBuilder.BUILD, new DiagnosticCallback<String>() { @Override public String getDiagnosticAttributeValue() { return getServerInfo().getBuild(); } }).build(); }  void setMessageSource(MessageSource messageSource); ServerInfo getServerInfo(); @Override Map<DiagnosticAttribute, DiagnosticCallback> getDiagnosticData();  }### Answer:
@Test public void getDiagnosticDataTest() { Map<DiagnosticAttribute, DiagnosticCallback> resultDiagnosticData = serverInfoService.getDiagnosticData(); assertEquals(3, resultDiagnosticData.size()); assertEquals(serverVersion, resultDiagnosticData.get(new DiagnosticAttributeImpl( DiagnosticAttributeBuilder.VERSION, null, null)).getDiagnosticAttributeValue()); assertEquals(serverEdition, resultDiagnosticData.get(new DiagnosticAttributeImpl( DiagnosticAttributeBuilder.SOURCE_EDITION, null, null)).getDiagnosticAttributeValue()); assertEquals(BUILD_DATE_STAMP_VALUE + "_" + BUILD_TIME_STAMP_VALUE, resultDiagnosticData.get(new DiagnosticAttributeImpl( DiagnosticAttributeBuilder.BUILD, null, null)).getDiagnosticAttributeValue()); }