@SuppressWarnings("unchecked")
@Test(expected = RepositoryException.class)
public void testBeforeExtract_throws() throws Exception {

    final PackageId arg0 = PackageId.fromString("my_packages:example:1.0");
    final Session arg1 = mock(Session.class);
    final PackageProperties arg2 = mock(PackageProperties.class);
    final MetaInf arg3 = mock(MetaInf.class);
    final List<PackageId> arg4 = new ArrayList<>();
    final ProgressCheck delegate = mock(ProgressCheck.class);
    doThrow(RepositoryException.class).when(delegate).beforeExtract(
            any(PackageId.class),
            any(Session.class),
            any(PackageProperties.class),
            any(MetaInf.class),
            any(List.class));
    final SilencingCheckFacade alias = new SilencingCheckFacade(delegate);
    alias.beforeExtract(arg0, arg1, arg2, arg3, arg4);
}