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

    final FlowUri flowUri = new FlowUri("http://localhost:18080", UUID.randomUUID().toString(), UUID.randomUUID().toString());
    when(flowSnapshotClient.getLatest(flowUri.getBucketId(), flowUri.getFlowId())).thenThrow(new NiFiRegistryException("No Versions"));
    flowRetrievalService.getLatestFlow(flowUri);
}