Fix an issue in UT
@@ -75,10 +75,16 @@ public class AbstractNiFiProcessorsRestClientTest {
processors.stream().forEach(processorDTO -> {
Mockito.when(client.findById("parent", processorDTO.getId())).thenReturn(Optional.of(processorDTO));
ProcessorDTO wakeupDto = client.wakeUp(processorDTO);
+
+ if (wakeupDto.getConfig() != null) {
//Ensure the dto after wakeup matches the starting dto
Assert.assertEquals(wakeupDto.getConfig().getSchedulingStrategy(), processorDTO.getConfig().getSchedulingStrategy());
Assert.assertEquals(wakeupDto.getConfig().getSchedulingPeriod(), processorDTO.getConfig().getSchedulingPeriod());
+
+ if (wakeupDto.getState() != null) {
Assert.assertEquals(wakeupDto.getState(), processorDTO.getState());
+ }
+ }
});
