### Question:
Jps { static public List<Integer> getPid(String mainClassName) { if (mainClassName == null) return Collections.emptyList(); String plainName = plainClassName(mainClassName); Jps jps = new Jps(); List<Integer> ints = new LinkedList<Integer>(); Set<Map.Entry<Integer, String>> set = jps.pidMap.entrySet(); Iterator<Map.Entry<Integer, String>> it = set.iterator(); while (it.hasNext()) { Map.Entry<Integer, String> entry = it.next(); String valueFull = entry.getValue(); String valuePlain = plainClassName(valueFull); if (mainClassName.equals(valueFull) || plainName.equals(valuePlain)) ints.add(entry.getKey()); } return ints; } private  Jps(); static void main(String[] args); static Map<Integer, String> getProcessTable(); static List<Integer> getPid(String mainClassName); final static boolean isPid(int apid);  }### Answer:
@Test public void atest() { List<Integer> pid = Jps.getPid("ASMain"); }