- public void getExistingYangTextSchemaSource() throws IOException, SchemaSourceException {
- String source = "Test";
- YangTextSchemaSource schemaSource = YangTextSchemaSource.delegateForByteSource(
- ID, ByteSource.wrap(source.getBytes()));
- YangTextSchemaSourceSerializationProxy sourceProxy = new YangTextSchemaSourceSerializationProxy(schemaSource);
- Mockito.when(mockedRemoteSchemaRepository.getYangTextSchemaSource(ID))
- .thenReturn(Futures.successful(sourceProxy));
+ public void getExistingYangTextSchemaSource() throws IOException, InterruptedException, ExecutionException {
+ YangTextSchemaSource schemaSource = YangTextSchemaSource.delegateForByteSource(ID,
+ CharSource.wrap("Test").asByteSource(StandardCharsets.UTF_8));
+ doReturn(Futures.successful(new YangTextSchemaSourceSerializationProxy(schemaSource)))
+ .when(mockedRemoteSchemaRepository).getYangTextSchemaSource(ID);