Subject subject = Subject.getSubject(AccessController.getContext());
String p = subject.getPrincipals().iterator().next().toString();
log.info("Sending request as: "+p);
Packet request = new ByteArrayPacket("whoami".getBytes());
Packet response = channel.request(request, 1000*5*1000);
assertNotNull(response);
assertEquals( p, new String(response.sliceAsBytes()) );
return null;
}