BlobRepositoryImpl implements BlobRepository { @Override public InputStream get(String id) throws AmbiguousIdException, IOException { prepare(); id = prepareId(id); File file = getFileFor(id); if(file == null) { return null; } if(valid(id, file)) { return Files.newInputStream(file.toPath()); } if(file.delete()) { if(logger.isInfoEnabled()) logger.info("Deleted invalid entry for id {}.", id); } else { if(logger.isErrorEnabled()) logger.error("Failed to delete invalid entry for id {}! ({})", id, file.getAbsolutePath()); } return null; }  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();  }
@Test(expected = IllegalStateException.class) public void misconfigurationGet() throws IOException, AmbiguousIdException { BlobRepositoryImpl instance=new BlobRepositoryImpl(); instance.get(TEST_DATA_ID); }