@Test
public void testGetProcessGroupNonRootGroup() {

    final String flowId = "1";
    when(flowManager.getFlow(flowId)).thenReturn(Optional.of(flow));
    // We just want to prove that the service is populating the component definitions, so just return anything here
    when(processorService.getComponentDefinition(any(String.class), any(VersionedProcessor.class))).thenReturn(processorDefinition);
    when(controllerServiceService.getComponentDefinition(any(String.class), any(VersionedControllerService.class))).thenReturn(controllerServiceDefinition);
    final FDProcessGroupFlow processGroupFlow = processGroupFlowService.get(flowId, group3.getIdentifier(), true);
    assertNotNull(processGroupFlow);
    final FDProcessGroupFlowContent processGroupFlowContent = processGroupFlow.getFlowContent();
    assertEquals(0, processGroupFlowContent.getProcessGroups().size());
    assertEquals(group3.getProcessGroups().size(), processGroupFlowContent.getProcessGroups().size());
    final int totalProcessors = getNumberOfProcessors(processGroupFlowContent);
    assertEquals(1, totalProcessors);
}