InterruptRefPattern extends AbstractCliPattern<Long> { @Override public Long getValue() { return reference; } InterruptRefPattern(); @Override Long getValue(); @Override void notifyNotFound(); @Override boolean notFoundIsFatal();  }
@Test public void testSuccess1() { String line = "user interrupt reference id: 3422"; InterruptRefPattern pattern = new InterruptRefPattern(); boolean matches = pattern.matchesLine(line); assertTrue("Pattern does not match", matches); assertEquals(Long.valueOf(3422), pattern.getValue()); }
@Test public void testSuccess2() { String line = " \t s user interrupt reference id: 3422"; InterruptRefPattern pattern = new InterruptRefPattern(); boolean matches = pattern.matchesLine(line); assertTrue("Pattern does not match", matches); assertEquals(Long.valueOf(3422), pattern.getValue()); }