use of org.apache.nifi.remote.RemoteGroupPort in project nifi by apache.
the class TestRemoteProcessGroupAuditor method testEnablePort.
@Test
public void testEnablePort() throws Throwable {
final RemoteGroupPort existingRPGPort = defaultRemoteGroupPort();
when(existingRPGPort.getName()).thenReturn("input-port-1");
when(existingRPGPort.isRunning()).thenReturn(false);
final RemoteProcessGroupPortDTO inputRPGPortDTO = defaultRemoteProcessGroupPortDTO();
inputRPGPortDTO.setTransmitting(true);
final Collection<Action> actions = updateProcessGroupInputPortConfiguration(inputRPGPortDTO, existingRPGPort);
assertEquals(1, actions.size());
final Action action = actions.iterator().next();
assertEquals(Operation.Configure, action.getOperation());
assertConfigureDetails(action.getActionDetails(), "input-port-1.Transmission", "disabled", "enabled");
}
Aggregations