@Test
public void testStartedScan() throws Exception {

    ExpectPaths.Check check = checkFor(key(ExpectPaths.keys().expectedPaths(), arr("/foo")).get());
    final PackageId pid = PackageId.fromString("foo");
    final Session session = mock(Session.class);
    check.afterExtract(pid, session);
    check.startedScan();
    check.afterExtract(pid, session);
    check.afterExtract(pid, session);
    check.finishedScan();
    Collection<Violation> violations = check.getReportedViolations();
    assertEquals("expect one violation", 1, violations.stream().count());
    assertEquals("expect one packageId", 1, violations.stream().findFirst().get().getPackages().size());
}