+ private val workingCommand = mock<AbstractSoneCommand>().apply {
+ whenever(execute(any(), any(), any())).thenReturn(Response("Working", SimpleFieldSet(true).apply {
+ putSingle("ReallyWorking", "true")
+ }))
+ }
+ private val brokenCommand = mock<AbstractSoneCommand>().apply {
+ whenever(execute(any(), any(), any())).thenThrow(RuntimeException::class.java)
+ }
+ private val commandSupplier = object : CommandSupplier() {
+ override fun supplyCommands(core: Core): Map<String, AbstractSoneCommand> {
+ return mapOf(
+ "Working" to workingCommand,
+ "Broken" to brokenCommand
+ )
+ }
+ }
+ private val fcpInterface = FcpInterface(core, commandSupplier)