@Test public void toStringContainsRightPid() { NativeProcessImpl proc1 = new NativeProcessImpl(1234, "ayy", "lmao"); NativeProcessImpl proc2 = new NativeProcessImpl(29999, "ayy", "lmao"); assertTrue(proc1.toString().contains("1234")); assertTrue(proc2.toString().contains("29999")); }
@Override public String toString() { return String.format("{ PID: %d, owner: %s, description: %s }", pid, owner, description ); }
NativeProcessImpl implements NativeProcess { @Override public String toString() { return String.format("{ PID: %d, owner: %s, description: %s }", pid, owner, description ); } }
NativeProcessImpl implements NativeProcess { @Override public String toString() { return String.format("{ PID: %d, owner: %s, description: %s }", pid, owner, description ); } NativeProcessImpl();  NativeProcessImpl(int pid, String description, String owner); }
NativeProcessImpl implements NativeProcess { @Override public String toString() { return String.format("{ PID: %d, owner: %s, description: %s }", pid, owner, description ); } NativeProcessImpl();  NativeProcessImpl(int pid, String description, String owner); @Override int getPid(); @Override void setPid(int pid); @Override String getDescription(); @Override void setDescription(String description); @Override String getOwner(); @Override void setOwner(String owner); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
NativeProcessImpl implements NativeProcess { @Override public String toString() { return String.format("{ PID: %d, owner: %s, description: %s }", pid, owner, description ); } NativeProcessImpl();  NativeProcessImpl(int pid, String description, String owner); @Override int getPid(); @Override void setPid(int pid); @Override String getDescription(); @Override void setDescription(String description); @Override String getOwner(); @Override void setOwner(String owner); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }