Я пытаюсь заглушить абстрактный класс java.nio.channels.ServerSocketChannel
, но получил
Error:(15, 18) object creation impossible, since:
it has 2 unimplemented members.
/** As seen from <$anon: java.nio.channels.ServerSocketChannel>, the missing signatures are as follows.
* For convenience, these are usable as stub implementations.
*/
protected[package spi] def implCloseSelectableChannel(): Unit = ???
protected[package spi] def implConfigureBlocking(x$1: Boolean): Unit = ???
socket = stub[ServerSocketChannel]
Конечно, я могу переопределить эти методы в тестовом подклассе, но, может быть, есть более элегантное решение?