@Test(expected = FlowRetrievalException.class)
public void testRetrieveSpecificWhenNoVersions() throws IOException, FlowRetrievalException, NiFiRegistryException {

    final FlowUri flowUri = new FlowUri("http://localhost:18080", UUID.randomUUID().toString(), UUID.randomUUID().toString());
    final int version = 2;
    when(flowSnapshotClient.get(flowUri.getBucketId(), flowUri.getFlowId(), version)).thenThrow(new NiFiRegistryException("No versions"));
    flowRetrievalService.getFlow(flowUri, version);
}