@Test
public void testUpdateSuccess() {

    final String flowId = flow.getFlowMetadata().getIdentifier();
    when(flowManager.getFlow(flowId)).thenReturn(Optional.of(flow));
    final String updatedTargetUris = "http://updated";
    final String updatedCommsTimeout = "1 seconds";
    final String updatedYieldDuration = "1 seconds";
    final String updatedTransportProtocol = "HTTP";
    assertNotEquals(updatedTargetUris, remoteProcessGroup.getTargetUris());
    assertNotEquals(updatedCommsTimeout, remoteProcessGroup.getCommunicationsTimeout());
    assertNotEquals(updatedYieldDuration, remoteProcessGroup.getYieldDuration());
    assertNotEquals(updatedTransportProtocol, remoteProcessGroup.getTransportProtocol());
    final VersionedRemoteProcessGroup requestConfig = new VersionedRemoteProcessGroup();
    requestConfig.setIdentifier(remoteProcessGroup.getIdentifier());
    requestConfig.setTargetUris(updatedTargetUris);
    requestConfig.setCommunicationsTimeout(updatedCommsTimeout);
    requestConfig.setYieldDuration(updatedYieldDuration);
    requestConfig.setTransportProtocol(updatedTransportProtocol);
    final FDRemoteProcessGroup updatedRemoteProcessGroup = service.update(flowId, requestConfig);
    assertNotNull(updatedRemoteProcessGroup);
    assertEquals(requestConfig.getIdentifier(), updatedRemoteProcessGroup.getComponentConfiguration().getIdentifier());
    assertEquals(updatedTargetUris, updatedRemoteProcessGroup.getComponentConfiguration().getTargetUris());
    assertEquals(updatedCommsTimeout, updatedRemoteProcessGroup.getComponentConfiguration().getCommunicationsTimeout());
    assertEquals(updatedYieldDuration, updatedRemoteProcessGroup.getComponentConfiguration().getYieldDuration());
    assertEquals(updatedTransportProtocol, updatedRemoteProcessGroup.getComponentConfiguration().getTransportProtocol());
}