@Test
public void testExecuteObjectNotFound() {

    // SETUP
    final PeriodicMeterReadsRequestDto request = new PeriodicMeterReadsRequestDto(PeriodTypeDto.DAILY,
            this.fromDateTime.toDate(), this.toDateTime.toDate(), ChannelDto.ONE);
    when(this.dlmsObjectConfigService.findAttributeAddressForProfile(any(), any(), any(), any(), any(), any()))
            .thenReturn(Optional.empty());
    // CALL
    try {
        this.executor.execute(this.connectionManager, this.device, request);
        fail("When no matching object is found, then execute should fail");
    } catch (final ProtocolAdapterException e) {
        assertThat(e.getMessage()).isEqualTo("No address found for " + DlmsObjectType.DAILY_LOAD_PROFILE);
    }
}