### Question:
GitFlowPersistenceProvider implements MetadataAwareFlowPersistenceProvider { @Override public byte[] getFlowContent(String bucketId, String flowId, int version) throws FlowPersistenceException { final Bucket bucket = getBucketOrFail(bucketId); final Flow flow = getFlowOrFail(bucket, flowId); if (!flow.hasVersion(version)) { throw new FlowPersistenceException(format("Flow ID %s version %d was not found in bucket %s:%s.", flowId, version, bucket.getBucketDirName(), bucketId)); } final Flow.FlowPointer flowPointer = flow.getFlowVersion(version); try { return flowMetaData.getContent(flowPointer.getObjectId()); } catch (IOException e) { throw new FlowPersistenceException(format("Failed to get content of Flow ID %s version %d in bucket %s:%s due to %s.", flowId, version, bucket.getBucketDirName(), bucketId, e), e); } }  @Override void onConfigured(ProviderConfigurationContext configurationContext); @Override void saveFlowContent(FlowSnapshotContext context, byte[] content); @Override byte[] getFlowContent(String bucketId, String flowId, int version); @Override void deleteAllFlowContent(String bucketId, String flowId); @Override void deleteFlowContent(String bucketId, String flowId, int version); @Override List<BucketMetadata> getMetadata();  }### Answer:
@Test public void testLoadEmptyGitDir() throws GitAPIException, IOException { final Map<String, String> properties = new HashMap<>(); properties.put(GitFlowPersistenceProvider.FLOW_STORAGE_DIR_PROP, "target/empty-git"); assertProvider(properties, g -> {}, p -> { try { p.getFlowContent("bucket-id-A", "flow-id-1", 1); } catch (FlowPersistenceException e) { assertEquals("Bucket ID bucket-id-A was not found.", e.getMessage()); } }, true); }