@Test public void testWriteJson() { MetricsExporter mockedExporter = mock(MetricsExporter.class); Map<String, Integer> metrics = new HashMap<>(); String outputFilepath = "whatever-path"; doCallRealMethod().when(mockedExporter).writeFile("json", metrics, outputFilepath); mockedExporter.writeFile("json", metrics, outputFilepath); verify(mockedExporter).writeFile("json", metrics, outputFilepath); }
private void writeJson(Map<String, Integer> metrics, String filepath) { System.out.println("Functionality not implemented yet. "); }
MetricsExporter { private void writeJson(Map<String, Integer> metrics, String filepath) { System.out.println("Functionality not implemented yet. "); } }
MetricsExporter { private void writeJson(Map<String, Integer> metrics, String filepath) { System.out.println("Functionality not implemented yet. "); }  }
MetricsExporter { private void writeJson(Map<String, Integer> metrics, String filepath) { System.out.println("Functionality not implemented yet. "); }  void writeFile(String outputType, Map<String, Integer> metrics, String filepath); }
MetricsExporter { private void writeJson(Map<String, Integer> metrics, String filepath) { System.out.println("Functionality not implemented yet. "); }  void writeFile(String outputType, Map<String, Integer> metrics, String filepath);  }