### Question:
S3FileStore implements InternetFileStore { @Override public FileItem read(final FilePath filePath) throws NonExistentItemException { checkInitialization(); final GetObjectRequest getObjectRequest = new GetObjectRequest(bucketNameForFilePath(filePath), filePath.filename()); FileItem fileItem = null; try (final S3Object s3Object = amazonS3Client.getObject(getObjectRequest)) { final Map<String, String> userMetaData = getUserMetaData(s3Object); final String filename = userMetaData.get(USER_METADATA_FILENAME); final DateTime lastUpdatedTime = getLastUpdatedTime(userMetaData); try { fileItem = new FileItem(filename, s3Object.getObjectContent(), lastUpdatedTime); } catch (final IOException e) { throw new IllegalStateException(e); } } catch (final AmazonS3Exception e) { if (missingItemErrorCodes.contains(e.getErrorCode())) { throw new NonExistentItemException( "Item does not exist" + filePath.directory() + "->" + filePath.filename()); } throw e; } catch (final IOException e1) { logger.warn("Error closing S3Object", e1); } return fileItem; } S3FileStore(final String bucketSchema); void initialize(final AmazonS3 amazonS3Client); @Override FileItem read(final FilePath filePath); @Override void write(final FilePath filePath, final FileItem fileItem); @Override void write(final FilePath filePath, final FileItem fileItem, final String filename); @Override void delete(final FilePath filePath); @Override URL publicUrlForFilePath(final FilePath filePath); @Override List<FilePath> list(final String directory, final String prefix);  }### Answer:
@Test public void shouldRead_whenNotInitialized() { final S3FileStore s3FileStore = new S3FileStore(bucketSchema); IllegalStateException actualException = null; try { s3FileStore.read(filePath); } catch (final IllegalStateException e) { actualException = e; } assertNotNull(actualException); }