@Test
public void getNonExistingSchemaSource() throws InterruptedException {

    doReturn(Futures.failed(new SchemaSourceException("Source not provided")))
        .when(mockedRemoteSchemaRepository).getYangTextSchemaSource(ID);
    ListenableFuture<YangTextSchemaSource> sourceFuture = remoteSchemaProvider.getSource(ID);
    assertTrue(sourceFuture.isDone());
    try {
        sourceFuture.get();
        fail("Expected a failure to occur");
    } catch (ExecutionException e) {
        assertThat(e.getCause(), instanceOf(SchemaSourceException.class));
    }
}