use of org.opensmartgridplatform.dto.da.measurements.MeasurementReportDto in project open-smart-grid-platform by OSGP.
the class LightMeasurementDeviceResponseServiceTest method sendLightSensorStatusResponseShouldDequeueCorrelationUid.
@Test
void sendLightSensorStatusResponseShouldDequeueCorrelationUid() {
final MeasurementReportDto measurementReportDto = MeasurementReportFactory.getMeasurementReportDto();
final ResponseMetadata responseMetadata = new ResponseMetadata.Builder().withCorrelationUid(CORRELATION_UID).withDeviceIdentification(Iec60870DeviceFactory.LMD_1_DEVICE_IDENTIFICATION).withOrganisationIdentification(ORGANISATION_IDENTIFICATION).build();
final Iec60870Device lightMeasurementDevice1 = Iec60870DeviceFactory.getLightMeasurementDevice1();
final Iec60870Device lightMeasurementDevice2 = Iec60870DeviceFactory.getLightMeasurementDevice2();
when(this.iec60870DeviceRepository.findByGatewayDeviceIdentification(Iec60870DeviceFactory.GATEWAY_DEVICE_IDENTIFICATION)).thenReturn(Arrays.asList(lightMeasurementDevice1, lightMeasurementDevice2));
this.lightMeasurementDeviceResponseService.sendLightSensorStatusResponse(measurementReportDto, lightMeasurementDevice1, responseMetadata, "");
verify(this.pendingRequestsQueue).dequeue(eq(Iec60870DeviceFactory.LMD_1_DEVICE_IDENTIFICATION));
}
Aggregations