### Question:
VaultModule { @Provides @PerVault @DefaultMountFlags public StringBinding provideDefaultMountFlags(Settings settings, VaultSettings vaultSettings) { ObjectProperty<VolumeImpl> preferredVolumeImpl = settings.preferredVolumeImpl(); StringBinding mountName = vaultSettings.mountName(); BooleanProperty readOnly = vaultSettings.usesReadOnlyMode(); return Bindings.createStringBinding(() -> { VolumeImpl v = preferredVolumeImpl.get(); if (v == VolumeImpl.FUSE && SystemUtils.IS_OS_MAC) { return getMacFuseDefaultMountFlags(mountName, readOnly); } else if (v == VolumeImpl.FUSE && SystemUtils.IS_OS_LINUX) { return getLinuxFuseDefaultMountFlags(readOnly); } else if (v == VolumeImpl.DOKANY && SystemUtils.IS_OS_WINDOWS) { return getDokanyDefaultMountFlags(readOnly); } else { return "--flags-supported-on-FUSE-or-DOKANY-only"; } }, mountName, readOnly, preferredVolumeImpl); }  @Provides @PerVault AtomicReference<CryptoFileSystem> provideCryptoFileSystemReference(); @Provides @PerVault ObjectProperty<VaultState> provideVaultState(VaultState initialState); @Provides @Named("lastKnownException") @PerVault ObjectProperty<Exception> provideLastKnownException(@Named("lastKnownException") @Nullable Exception initialErrorCause); @Provides Volume provideVolume(Settings settings, WebDavVolume webDavVolume, FuseVolume fuseVolume, DokanyVolume dokanyVolume); @Provides @PerVault @DefaultMountFlags StringBinding provideDefaultMountFlags(Settings settings, VaultSettings vaultSettings);  }### Answer:
@Test @DisplayName("provideDefaultMountFlags on Mac/FUSE") @EnabledOnOs(OS.MAC) public void testMacFuseDefaultMountFlags() { Mockito.when(settings.preferredVolumeImpl()).thenReturn(new SimpleObjectProperty<>(VolumeImpl.FUSE)); StringBinding result = module.provideDefaultMountFlags(settings, vaultSettings); MatcherAssert.assertThat(result.get(), CoreMatchers.containsString("-ovolname=TEST")); MatcherAssert.assertThat(result.get(), CoreMatchers.containsString("-ordonly")); }
@Test @DisplayName("provideDefaultMountFlags on Linux/FUSE") @EnabledOnOs(OS.LINUX) public void testLinuxFuseDefaultMountFlags() { Mockito.when(settings.preferredVolumeImpl()).thenReturn(new SimpleObjectProperty<>(VolumeImpl.FUSE)); StringBinding result = module.provideDefaultMountFlags(settings, vaultSettings); MatcherAssert.assertThat(result.get(), CoreMatchers.containsString("-oro")); }
@Test @DisplayName("provideDefaultMountFlags on Windows/Dokany") @EnabledOnOs(OS.WINDOWS) public void testWinDokanyDefaultMountFlags() { Mockito.when(settings.preferredVolumeImpl()).thenReturn(new SimpleObjectProperty<>(VolumeImpl.DOKANY)); StringBinding result = module.provideDefaultMountFlags(settings, vaultSettings); MatcherAssert.assertThat(result.get(), CoreMatchers.containsString("--options CURRENT_SESSION,WRITE_PROTECTION")); }