### Question:
ServerInfoCollector { void storeJavaSystemProperties(final File outputDir) { try { System.out.print("Getting Java System Properties..."); final Map<String, String> javaSysProps = client.getJavaSystemProperties(); try (DiagBundleEntryWriter configEntryWriter = new DiagBundleEntryWriter(outputDir, "java-sys-props.txt")) { for (Map.Entry<String, String> ent : javaSysProps.entrySet()) { configEntryWriter.writeStringValue(ent.getKey() + " : ", ent.getValue()); } } System.out.println("Done"); } catch (OozieClientException | IOException e) { System.err.printf("Exception occurred during the retrieval of Java system property settings for the Oozie server:" + " %s%n", e.getMessage()); } } ServerInfoCollector(final DiagOozieClient client);   }### Answer:
@Test public void testGetJavaSystemProperties() throws Exception { Map<String, String> testSysProps = new HashMap<>(); testSysProps.put("javax.xml.parsers.DocumentBuilderFactory", "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"); doReturn(testSysProps).when(mockDiagClient).getJavaSystemProperties(); serverInfoCollector.storeJavaSystemProperties(testTempFolder); final File shareLibOut = new File(testTempFolder, "java-sys-props.txt"); assertTrue(shareLibOut.exists()); assertFileContains(shareLibOut, "DocumentBuilderFactory"); }