@Test
public void findProcess() throws Exception, NoSuchMethodException, IllegalAccessException {

    List<ProcessDescription> procs = filterOwnProcess(vmHandler.listProcesses());
    for (ProcessDescription desc : procs) {
        try {
            if (desc.getDisplay() != null && desc.getDisplay().length() > 0) {
                Pattern singleHitPattern = Pattern.compile("^" + Pattern.quote(desc.getDisplay()) + "$");
                assertTrue(tryAttach(singleHitPattern.pattern()));
                break;
            }
        } catch (Exception exp) {
            // We ignore error which happen spuriously
            System.out.println("Cannot attach to " + desc.getDisplay() + " (" + desc.getId() + "): " + exp);
            exp.printStackTrace();
        }
    }
    assertFalse(tryAttach("RobertMakClaudioPizarro",".*No.*process.*"));
    if (procs.size() >= 2) {
        assertFalse(tryAttach(".",procs.get(0).getId()));
    }
}