@Test(expected = SchemaSourceException.class)
public void testGetNonExistentYangTextSchemaSource() throws Exception {

    Mockito.when(mockedLocalRepository.getSchemaSource(ID, YangTextSchemaSource.class)).thenReturn(
            Futures.immediateFailedFuture(new SchemaSourceException("Source is not provided")));
    Future<YangTextSchemaSourceSerializationProxy> retrievedSourceFuture =
            remoteRepository.getYangTextSchemaSource(ID);
    assertTrue(retrievedSourceFuture.isCompleted());
    Await.result(retrievedSourceFuture, FiniteDuration.Zero());
}