@Test
public void testGetExistingYangTextSchemaSource() throws Exception {

    String source = "Test source.";
    YangTextSchemaSource schemaSource = YangTextSchemaSource.delegateForByteSource(
            ID, ByteSource.wrap(source.getBytes()));
    Mockito.when(mockedLocalRepository.getSchemaSource(ID, YangTextSchemaSource.class)).thenReturn(
            Futures.immediateFuture(schemaSource));
    Future<YangTextSchemaSourceSerializationProxy> retrievedSourceFuture =
            remoteRepository.getYangTextSchemaSource(ID);
    assertTrue(retrievedSourceFuture.isCompleted());
    YangTextSchemaSource resultSchemaSource = Await.result(retrievedSourceFuture,
            FiniteDuration.Zero()).getRepresentation();
    assertEquals(resultSchemaSource.getIdentifier(), schemaSource.getIdentifier());
    assertArrayEquals(resultSchemaSource.read(), schemaSource.read());
}