Source:
<code>public void testNonDefaultsWriterFactory() throws ValidationException { final ImmutableList<String> typenames = ImmutableList.of(); final Map<String, Object> settings = new HashMap<>(); final GelfWriterFactory gelfWriterFactory = new GelfWriterFactory( typenames, "test", 12202, ImmutableMap.of("type", (Object) "jmx"), "udp", 10, 10, 10, true, 10, true, "/somefile", true, true, 10 ); assertThat( gelfWriterFactory.getGelfConfiguration().getQueueSize() ).isEqualTo(10) .as("Invalid queue size"); assertThat( gelfWriterFactory.getGelfConfiguration().getConnectTimeout() ).isEqualTo(10) .as("Invalid connection timeout"); assertThat( gelfWriterFactory.getGelfConfiguration().getReconnectDelay() ).isEqualTo(10) .as("Invalid reconnect delay"); assertThat( gelfWriterFactory.getGelfConfiguration().isTcpNoDelay() ).isTrue() .as("Invalid tcp no delay"); assertThat( gelfWriterFactory.getGelfConfiguration().getSendBufferSize() ).isEqualTo(10) .as("Invalid send buffer size"); assertThat( gelfWriterFactory.getGelfConfiguration().getTlsTrustCertChainFile() ).isInstanceOf(File.class) .as("Invalid tls trustcertchain file"); assertThat( gelfWriterFactory.getGelfConfiguration().getTlsTrustCertChainFile() .getPath() <START> ).isEqualTo(File.separator + "somefile") <END> .as("Invalid tls trustcertchain file"); assertThat( gelfWriterFactory.getGelfConfiguration().isTlsCertVerificationEnabled() ).isTrue() .as("Invalid tls Cert verification enabled"); assertThat( gelfWriterFactory.getGelfConfiguration().isTcpKeepAlive() ).isTrue() .as("Invalid tcp keep alive"); assertThat( gelfWriterFactory.getGelfConfiguration().getMaxInflightSends() ).isEqualTo(10) .as("Invalid max inflight sends"); final GelfWriter gelfWriter = gelfWriterFactory.create(); assertThat(gelfWriter).isNotNull().as("Didn't get a writer back."); }</code><technical_language>compare File object. I if AssertJ some support do this more cleanly..</technical_language>

Target:
public void testNonDefaultsWriterFactory() throws ValidationException { final ImmutableList<String> typenames = ImmutableList.of(); final Map<String, Object> settings = new HashMap<>(); final GelfWriterFactory gelfWriterFactory = new GelfWriterFactory( typenames, "test", 12202, ImmutableMap.of("type", (Object) "jmx"), "udp", 10, 10, 10, true, 10, true, "/somefile", true, true, 10 ); assertThat( gelfWriterFactory.getGelfConfiguration().getQueueSize() ).isEqualTo(10) .as("Invalid queue size"); assertThat( gelfWriterFactory.getGelfConfiguration().getConnectTimeout() ).isEqualTo(10) .as("Invalid connection timeout"); assertThat( gelfWriterFactory.getGelfConfiguration().getReconnectDelay() ).isEqualTo(10) .as("Invalid reconnect delay"); assertThat( gelfWriterFactory.getGelfConfiguration().isTcpNoDelay() ).isTrue() .as("Invalid tcp no delay"); assertThat( gelfWriterFactory.getGelfConfiguration().getSendBufferSize() ).isEqualTo(10) .as("Invalid send buffer size"); assertThat( gelfWriterFactory.getGelfConfiguration().getTlsTrustCertChainFile() ).isInstanceOf(File.class) .as("Invalid tls trustcertchain file"); assertThat( gelfWriterFactory.getGelfConfiguration().getTlsTrustCertChainFile() ).hasName("somefile") .as("Invalid tls trustcertchain file"); assertThat( gelfWriterFactory.getGelfConfiguration().isTlsCertVerificationEnabled() ).isTrue() .as("Invalid tls Cert verification enabled"); assertThat( gelfWriterFactory.getGelfConfiguration().isTcpKeepAlive() ).isTrue() .as("Invalid tcp keep alive"); assertThat( gelfWriterFactory.getGelfConfiguration().getMaxInflightSends() ).isEqualTo(10) .as("Invalid max inflight sends"); final GelfWriter gelfWriter = gelfWriterFactory.create(); assertThat(gelfWriter).isNotNull().as("Didn't get a writer back."); }