### Question:
MiniXmlParser { public Map<String, String> getSystemProperties() throws MiniXmlParserException { if (!valid) { throw new MiniXmlParserException(strings.get("invalid")); } return sysProps.getCombinedSysProps(); } MiniXmlParser(File domainXml);  MiniXmlParser(File domainXml, String serverName); Map<String, String> getJavaConfig(); List<String> getJvmOptions(); Map<String, String> getProfilerConfig(); List<String> getProfilerJvmOptions(); Map<String, String> getProfilerSystemProperties(); Map<String, String> getSystemProperties(); String getDomainName(); List<HostAndPort> getAdminAddresses(); void setupConfigDir(File configDir, File installDir); boolean getSecureAdminEnabled(); String getLogFilename(); boolean isMonitoringEnabled(); boolean hasNetworkConfig(); boolean hasDefaultConfig(); String getAdminRealmName(); Map<String,String> getAdminRealmProperties();  }### Answer:
@Test public void systemPropertyOverrides() { try { MiniXmlParser instance = new MiniXmlParser(rightOrder, "server"); Map<String, String> sysProps = instance.getSystemProperties(); assertEquals("valueFromServer", sysProps.get("test-prop")); } catch (MiniXmlParserException ex) { Logger.getLogger(MiniXmlParserTest.class.getName()).log(Level.SEVERE, null, ex); } }
@Test public void testSysPropParsing() throws MiniXmlParserException { MiniXmlParser instance = new MiniXmlParser(manysysprops, "i1"); Map<String, String> sp = instance.getSystemProperties(); assertTrue(sp.size() >= 4); String ser = sp.get("shouldbeserver"); String con = sp.get("shouldbeconfig"); String clu = sp.get("shouldbecluster"); String dom = sp.get("shouldbedomain"); String jun = sp.get("shouldbejunk"); assertNull(jun); assertEquals(ser, "server"); assertEquals(con, "config"); assertEquals(clu, "cluster"); assertEquals(dom, "domain"); }