@Test
public void testSomeMethod() throws Exception {

  LogAssert expect = TestLoggers.sys().expect("org.spf4j.perf.PerformanceMonitor",
          Level.ERROR,
          LogMatchers.hasFormat("Execution time  {} ms for {} exceeds error threshold of {} ms, detail: {}"));
  String result = PerformanceMonitor.callAndMonitor(
          1, 2, new Callable<String>() {
    @Override
    @SuppressFBWarnings("MDM_THREAD_YIELD")
    public String call() throws Exception {
      LOG.debug("testing");
      Thread.sleep(3);
      return "test";
    }
    @Override
    public String toString() {
      return "test";
    }
  });
  Assert.assertEquals("test", result);
  expect.assertObservation();
}