BlobRepositoryImpl implements BlobRepository { public void setBaseDirectory(File baseDirectory) { this.baseDirectory = baseDirectory; prepare(); }  boolean isCaseSensitive(); void setCaseSensitive(boolean caseSensitive); boolean isValidating(); void setValidating(boolean validating); File getBaseDirectory(); void setBaseDirectory(File baseDirectory); @Override String put(InputStream input); @Override String put(byte[] bytes); @Override InputStream get(String id); @Override boolean delete(String id); @Override boolean contains(String id); @Override long sizeOf(String id); @Override Set<String> idSet(); @Override String toString();  }
@SuppressWarnings({"ResultOfMethodCallIgnored"}) @Test(expected = IllegalStateException.class) public void brokenBaseDirectory() throws IOException { BlobRepositoryImpl instance=new BlobRepositoryImpl(); File readonlyBaseDirectory = folder.newFolder(FOO); readonlyBaseDirectory.setWritable(false, false); File baseDirectory=new File(readonlyBaseDirectory, "bar"); assumeTrue(!baseDirectory.mkdirs()); if(logger.isInfoEnabled()) logger.info("Actually executing brokenBaseDirectory test..."); instance.setBaseDirectory(baseDirectory); }