in src/com/jetbrains/clion/bugeater/debugger/FakeProcessHandler.java [14:51]
public FakeProcessHandler() {
super(new Process() {
private final CompletableFuture<Integer> processLock = new CompletableFuture<>();
@Override
public OutputStream getOutputStream() {
return new ByteArrayOutputStream();
}
@Override
public InputStream getInputStream() {
return new ByteArrayInputStream("Say something".getBytes());
}
@Override
public InputStream getErrorStream() {
return new ByteArrayInputStream(new byte[0]);
}
@Override
public int waitFor() throws InterruptedException {
try {
return processLock.get();
} catch (ExecutionException e) {
throw new RuntimeException(e);
}
}
@Override
public int exitValue() {
return processLock.getNow(-1);
}
@Override
public void destroy() {
processLock.complete(0);
}
}, "bug-eater", StandardCharsets.UTF_8);
}