@Override
  public boolean archive(String fileName, byte[] data) {
    checkArgument(!Strings.isNullOrEmpty(fileName));
    checkNotNull(data);

    try {
      logger.atInfo().log("Archiving data to file system with filename '%s'.", fileName);
      Files.asByteSink(new File(fileName)).write(data);
      return true;
    } catch (IOException e) {
      logger.atWarning().withCause(e).log("Failed archiving data to file '%s'.", fileName);
      return false;
    }
  }
@Test
  public void archive_whenInvalidTargetFileAndCharSequenceData_returnsFalse() throws IOException {
    File tempFile = temporaryFolder.newFile();
    String data = "file data";

    RawFileArchiver rawFileArchiver = new RawFileArchiver();

    assertThat(rawFileArchiver.archive(tempFile.getParent(), data)).isFalse();
    assertThat(tempFile.length()).isEqualTo(0);
  }