### Question:
GlobalConfDiagnosticConverter { public GlobalConfDiagnostics convert(DiagnosticsStatus diagnosticsStatus) { GlobalConfDiagnostics globalConfDiagnostics = new GlobalConfDiagnostics(); Optional<ConfigurationStatus> statusCode = ConfigurationStatusMapping.map( diagnosticsStatus.getReturnCode()); globalConfDiagnostics.setStatusCode(statusCode.orElse(null)); Optional<DiagnosticStatusClass> statusClass = DiagnosticStatusClassMapping.map( diagnosticsStatus.getReturnCode()); globalConfDiagnostics.setStatusClass(statusClass.orElse(null)); globalConfDiagnostics.setPrevUpdateAt(diagnosticsStatus.getPrevUpdate()); globalConfDiagnostics.setNextUpdateAt(diagnosticsStatus.getNextUpdate()); return globalConfDiagnostics; }  GlobalConfDiagnostics convert(DiagnosticsStatus diagnosticsStatus);  }### Answer:
@Test public void convertSingleGlobalConfDiagnostics() { GlobalConfDiagnostics globalConfDiagnostics = globalConfDiagnosticConverter.convert(new DiagnosticsStatus( DiagnosticsErrorCodes.RETURN_SUCCESS, PREVIOUS_UPDATE, NEXT_UPDATE)); assertEquals(ConfigurationStatus.SUCCESS, globalConfDiagnostics.getStatusCode()); assertEquals(DiagnosticStatusClass.OK, globalConfDiagnostics.getStatusClass()); assertEquals(PREVIOUS_UPDATE, globalConfDiagnostics.getPrevUpdateAt()); assertEquals(NEXT_UPDATE, globalConfDiagnostics.getNextUpdateAt()); }