My guess is that JUnit is tearing down the test before the sleep finishes, because the test execution thread exits the test method before the sleep finishes. Try
@Test
public void testWakeup() throws Exception {
Thread t = new Thread(new UserA());
t.start();
t.join();
}