### Question:
ProtocDescriptorBuilder implements DescriptorBuilder { @Override public Result buildDescriptor(final Stream<Path> paths) throws DescriptorBuilderException { final ImmutableList<Path> pathsList = paths.collect(toImmutableList()); if (pathsList.isEmpty()) { return Result.create(DescriptorProtos.FileDescriptorSet.getDefaultInstance()); } try { return buildFileDescriptorSet(pathsList); } catch (InterruptedException | IOException e) { throw new DescriptorBuilderException(e); } } private  ProtocDescriptorBuilder(final Path protocPath,
                                  final TemporaryFileStorage fileStorage); static ProtocDescriptorBuilder create(final Path protocPath); static Factory factory(final Path protocPath); static FactoryBuilder factoryBuilder(); @Override DescriptorBuilder setProtoFile(final Path path, final String content); @Override Result buildDescriptor(final Stream<Path> paths); @Override void close();  }### Answer:
@Test public void testBuildDescriptor() throws Exception { final DescriptorBuilder sut = ProtocDescriptorBuilder.factoryBuilder() .build() .newDescriptorBuilder(); final Path path1 = Paths.get("foo/bar/1.proto"); final Path path2 = Paths.get("foo/bar/2.proto"); sut.setProtoFile(path1, "syntax = 'proto2'; message One {}"); sut.setProtoFile(path2, "syntax = 'proto3'; message Two {}"); final DescriptorBuilder.Result result = sut.buildDescriptor(Stream.of(path1, path2)); assertThat( result.compilationError(), is(nullValue()) ); assertThat(result.fileDescriptorSet().getFileList(), hasSize(2)); }