BootstrapMetadata readFromConfiguration() {
        if (!ibp.isPresent()) {
            return BootstrapMetadata.fromVersion(MetadataVersion.latestProduction(), "the default bootstrap");
        }
        MetadataVersion version = MetadataVersion.fromVersionString(ibp.get());
        if (version.isLessThan(MINIMUM_BOOTSTRAP_VERSION)) {
            return BootstrapMetadata.fromVersion(MINIMUM_BOOTSTRAP_VERSION,
                "the minimum version bootstrap with metadata.version " + MINIMUM_BOOTSTRAP_VERSION);
        }
        return BootstrapMetadata.fromVersion(version,
            "the configured bootstrap with metadata.version " + version);
    }
@Test
    public void testReadFromConfiguration() throws Exception {
        try (BootstrapTestDirectory testDirectory = new BootstrapTestDirectory().createDirectory()) {
            assertEquals(BootstrapMetadata.fromVersion(MetadataVersion.IBP_3_3_IV2,
                    "the configured bootstrap with metadata.version 3.3-IV2"),
                new BootstrapDirectory(testDirectory.path(), Optional.of("3.3-IV2")).read());
        }
    }