### Question:
OpsLoggerFactory { public OpsLoggerFactory setDestination(PrintStream printStream) { validateParametersForSetDestination(printStream); clearCachedInstance(); loggerOutput = Optional.of(printStream); logfilePath = Optional.empty(); return this; }  OpsLoggerFactory setDestination(PrintStream printStream); OpsLoggerFactory setPath(Path path); OpsLoggerFactory setStoreStackTracesInFilesystem(boolean store); OpsLoggerFactory setStackTraceStoragePath(Path directory); OpsLoggerFactory setErrorHandler(Consumer<Throwable> handler); @Deprecated OpsLoggerFactory setCorrelationIdSupplier(Supplier<Map<String,String>> supplier); OpsLoggerFactory setGlobalDiagnosticContextSupplier(DiagnosticContextSupplier supplier); OpsLoggerFactory setAsync(boolean async); @SuppressWarnings("unchecked") OpsLogger<T> build();  }### Answer:
@Test public void setDestination_shouldThrowAnException_givenANullPrintStream() throws Exception { try { factory.setDestination(null); fail("Expected an exception"); } catch (NullPointerException expected) { assertThat(expected.getMessage(), containsString("must not be null")); } }