// This indirectly tests QPID-6283
  public void testFileSystemCheckWarnsWhenFileSystemDoesNotExist() throws Exception {
    Map<String, Object> attributes =
        Collections.<String, Object>singletonMap(AbstractVirtualHost.NAME, getTestName());
    final MessageStore store = mock(MessageStore.class);
    when(store.newMessageStoreReader()).thenReturn(mock(MessageStore.MessageStoreReader.class));
    File nonExistingFile = TestFileUtils.createTempFile(this);
    FileUtils.delete(nonExistingFile, false);
    when(store.getStoreLocationAsFile()).thenReturn(nonExistingFile);
    setTestSystemProperty("virtualhost.housekeepingCheckPeriod", "100");

    final AbstractVirtualHost host =
        new AbstractVirtualHost(attributes, _node) {
          @Override
          protected MessageStore createMessageStore() {
            return store;
          }
        };

    String loggerName = AbstractVirtualHost.class.getName();
    assertActionProducesLogMessage(
        new Runnable() {
          @Override
          public void run() {
            host.open();
          }
        },
        loggerName,
        Level.WARN,
        "Cannot check file system for disk space");
    host.close();
  }