### Question:
ProcessInfo { public String[] getCommandLine() { return commandLine; } protected  ProcessInfo();  ProcessInfo(long pid);  ProcessInfo(long pid, SigarProxy sigar); void refresh(); ProcessInfoSnapshot priorSnaphot(); ProcessInfoSnapshot freshSnapshot(); void destroy(); long getPid(); String getName(); String getBaseName(); String[] getCommandLine(); Map<String, String> getEnvironmentVariables(); @Nullable String getEnvironmentVariable(@NotNull
    String name); @Deprecated long getParentPid(); @Deprecated ProcState getState(); @Deprecated ProcExe getExecutable(); @Deprecated ProcTime getTime(); @Deprecated ProcMem getMemory(); @Deprecated ProcCpu getCpu(); @Deprecated ProcFd getFileDescriptor(); @Deprecated ProcCred getCredentials(); @Deprecated ProcCredName getCredentialsName(); @Deprecated String getCurrentWorkingDirectory(); @Deprecated boolean isRunning(); AggregateProcessInfo getAggregateProcessTree(); ProcessInfo getParentProcess(); void kill(String signalName); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testGetEmptyCommandLine() throws Exception { assertEquals(processInfo.getCommandLine(), new String[] {}); }
@Test public void testGetCommandLine() throws Exception { sigarProxy = Mockito.mock(SigarProxy.class); String[] array = new String[] { "one", "two", "three" }; when(sigarProxy.getProcArgs(PID)).thenReturn(array); processInfo = new ProcessInfo(PID, sigarProxy); assertEquals(processInfo.getCommandLine(), array); }