@Test public void testWrite() throws Exception { File logFile = temporaryFolder.newFile("keyout.log"); NagiosWriter writer = new NagiosWriter( ImmutableList.<String>of(), true, false, ImmutableList.<String>of("ObjectPendingFinalizationCount"), ImmutableList.<String>of("5"), "nagiost", logFile.getAbsolutePath(), null, null, ImmutableMap.<String, Object>of() ); Server server = dummyServer(); Query query = dummyQuery(); writer.validateSetup(server, query); writer.doWrite(server, query, singleNumericResult()); String log = Files.toString(logFile, Charset.forName("UTF-8")); assertThat(log.trim()).isEqualTo("[0] PROCESS_SERVICE_CHECK_RESULT;nagiost;ObjectPendingFinalizationCount;2;"); }
@Override public void validateSetup(Server server, Query query) throws ValidationException { checkFile(query); }
NagiosWriter extends BaseOutputWriter { @Override public void validateSetup(Server server, Query query) throws ValidationException { checkFile(query); } }
NagiosWriter extends BaseOutputWriter { @Override public void validateSetup(Server server, Query query) throws ValidationException { checkFile(query); } @JsonCreator  NagiosWriter(
			@JsonProperty("typeNames") ImmutableList<String> typeNames,
			@JsonProperty("booleanAsNumber") boolean booleanAsNumber,
			@JsonProperty("debug") Boolean debugEnabled,
			@JsonProperty("filters") List<String> filters,
			@JsonProperty("thresholds") List<String> thresholds,
			@JsonProperty("nagiosHost") String nagiosHost,
			@JsonProperty("outputFile") String outputFile,
			@JsonProperty("prefix") String prefix,
			@JsonProperty("suffix") String suffix,
			@JsonProperty("settings") Map<String, Object> settings); }
NagiosWriter extends BaseOutputWriter { @Override public void validateSetup(Server server, Query query) throws ValidationException { checkFile(query); } @JsonCreator  NagiosWriter(
			@JsonProperty("typeNames") ImmutableList<String> typeNames,
			@JsonProperty("booleanAsNumber") boolean booleanAsNumber,
			@JsonProperty("debug") Boolean debugEnabled,
			@JsonProperty("filters") List<String> filters,
			@JsonProperty("thresholds") List<String> thresholds,
			@JsonProperty("nagiosHost") String nagiosHost,
			@JsonProperty("outputFile") String outputFile,
			@JsonProperty("prefix") String prefix,
			@JsonProperty("suffix") String suffix,
			@JsonProperty("settings") Map<String, Object> settings); @Override void validateSetup(Server server, Query query); void checkFile(Query query); @Override void internalWrite(Server server, Query query, ImmutableList<Result> results); @Override void close(); ImmutableList<String> getFilters(); ImmutableList<String> getThresholds(); String getNagiosHost(); String getOutputFile(); String getPrefix(); String getSuffix(); }
NagiosWriter extends BaseOutputWriter { @Override public void validateSetup(Server server, Query query) throws ValidationException { checkFile(query); } @JsonCreator  NagiosWriter(
			@JsonProperty("typeNames") ImmutableList<String> typeNames,
			@JsonProperty("booleanAsNumber") boolean booleanAsNumber,
			@JsonProperty("debug") Boolean debugEnabled,
			@JsonProperty("filters") List<String> filters,
			@JsonProperty("thresholds") List<String> thresholds,
			@JsonProperty("nagiosHost") String nagiosHost,
			@JsonProperty("outputFile") String outputFile,
			@JsonProperty("prefix") String prefix,
			@JsonProperty("suffix") String suffix,
			@JsonProperty("settings") Map<String, Object> settings); @Override void validateSetup(Server server, Query query); void checkFile(Query query); @Override void internalWrite(Server server, Query query, ImmutableList<Result> results); @Override void close(); ImmutableList<String> getFilters(); ImmutableList<String> getThresholds(); String getNagiosHost(); String getOutputFile(); String getPrefix(); String getSuffix();  }