@Test
public void testForcedOffline() {

    final RemoteRepository central = new RemoteRepository.Builder( "central", "default", "http://repo1.maven.org/maven2/" ).build();
    final MavenProject mavenProject = mock(MavenProject.class);
    when(mavenProject.getRemoteProjectRepositories()).thenReturn(Collections.singletonList(central));
    final Aether aether = new Aether(mavenProject) {
        @Override
        boolean isForcedOffline() {
            return true;
        }
    };
    assertThat(aether.getRepositories()).doesNotContain(central);
}