JProfiler { public static RemoteCallable<Void> saveSnapshot(File file) { return new RemoteCallableStaticMethod<>(CONTROLLER_CLASS, "saveSnapshot", file); }  static RemoteCallable<Void> addBookmark(String description); static RemoteCallable<Void> addBookmark(String  description,
                                                   Color   color,
                                                   boolean dashed); static RemoteCallable<Void> enableTriggers(); static RemoteCallable<Void> disableTriggers(); static RemoteCallable<Void> enableTriggerGroup(String groupId); static RemoteCallable<Void> disableTriggerGroup(String groupId); static RemoteCallable<Void> saveSnapshot(File file); static RemoteCallable<Void> saveSnapshotOnExit(File file); static RemoteCallable<Void> startAllocRecording(boolean reset); static RemoteCallable<Void> startAllocRecording(boolean         reset,
                                                           TrackingOptions options); static RemoteCallable<Void> stopAllocRecording(); static RemoteCallable<Void> startCallTracer(int     cap,
                                                       boolean recordFiltered,
                                                       boolean reset); static RemoteCallable<Void> stopCallTracer(); static RemoteCallable<Void> startCPURecording(boolean reset); static RemoteCallable<Void> startCPURecording(boolean         reset,
                                                         TrackingOptions options); static RemoteCallable<Void> stopCPURecording(); static RemoteCallable<Void> startMethodStatsRecording(); static RemoteCallable<Void> stopMethodStatsRecording(); static RemoteCallable<Void> startMonitorRecording(); static RemoteCallable<Void> startMonitorRecording(int blockingThreshold,
                                                             int waitingThreshold); static RemoteCallable<Void> stopMonitorRecording(); static RemoteCallable<Void> startProbeRecording(String  probeName,
                                                           boolean events); static RemoteCallable<Void> startProbeRecording(String                probeName,
                                                           ProbeRecordingOptions options); static RemoteCallable<Void> stopProbeRecording(String probeName); static RemoteCallable<Void> startProbeTracking(String          probeName,
                                                          String[]        descriptions,
                                                          ProbeObjectType objectType,
                                                          ProbeValueType  valueType); static RemoteCallable<Void> stopProbeTracking(String          probeName,
                                                         String[]        descriptions,
                                                         ProbeObjectType objectType,
                                                         ProbeValueType  valueType); static RemoteCallable<Void> startThreadProfiling(); static RemoteCallable<Void> stopThreadProfiling(); static RemoteCallable<Void> startVMTelemetryRecording(); static RemoteCallable<Void> stopVMTelemetryRecording(); static RemoteCallable<Void> triggerHeapDump(); static RemoteCallable<Void> triggerHeapDump(HeapDumpOptions options); static RemoteCallable<Void> triggerThreadDump();  }
@Test public void shouldSaveSnapshot() throws Exception { File file = new File("/foo"); RemoteCallable<Void> callable = JProfiler.saveSnapshot(file); changeClass(callable); callable.call(); verify(ControllerStub.methodStub).method("saveSnapshot", file); }