<commit_before>package io.frontierrobotics.i2c.api

import com.nhaarman.mockito_kotlin.mock
import com.nhaarman.mockito_kotlin.verify
import io.frontierrobotics.i2c.bus.I2CAddress
import io.frontierrobotics.i2c.bus.I2CBus
import io.frontierrobotics.i2c.bus.I2CData
import org.jetbrains.spek.api.Spek


class APIControllerSpecs : Spek()
{
    init
    {
        given("a valid address and data")
        {
            val bus: I2CBus = mock()
            val controller = APIController(bus)

            on("sending a command")
            {
                it("should send the command over the bus")
                {
                    controller.sendComand(0x1C, "hello")
                    val data = I2CData("hello")
                    val address = I2CAddress(0x1C)

                    verify(bus).send(data, address)
                }
            }

            on("sending a command to an internal address")
            {
                it("should send the command over the bus")
                {
                    controller.sendComandToInternalAddress(0x1C, 0x01, "hello")
                    val data = I2CData("hello")
                    val address = I2CAddress(0x1C)
                    val internalAddress: Byte = 0x01

                    verify(bus).send(data, address, internalAddress)
                }
            }
        }
    }
}<commit_msg>Whitespace.<commit_after>package io.frontierrobotics.i2c.api

import com.nhaarman.mockito_kotlin.mock
import com.nhaarman.mockito_kotlin.verify
import io.frontierrobotics.i2c.bus.I2CAddress
import io.frontierrobotics.i2c.bus.I2CBus
import io.frontierrobotics.i2c.bus.I2CData
import org.jetbrains.spek.api.Spek

class APIControllerSpecs : Spek()
{
    init
    {
        given("a valid address and data")
        {
            val bus: I2CBus = mock()
            val controller = APIController(bus)

            on("sending a command")
            {
                it("should send the command over the bus")
                {
                    controller.sendComand(0x1C, "hello")
                    val data = I2CData("hello")
                    val address = I2CAddress(0x1C)

                    verify(bus).send(data, address)
                }
            }

            on("sending a command to an internal address")
            {
                it("should send the command over the bus")
                {
                    controller.sendComandToInternalAddress(0x1C, 0x01, "hello")
                    val data = I2CData("hello")
                    val address = I2CAddress(0x1C)
                    val internalAddress: Byte = 0x01

                    verify(bus).send(data, address, internalAddress)
                }
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.08494349252643091, 'fraction_numerical': 0.018957345971563982, 'mean_word_length': 1.5151237396883592, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5563440', 'n_tokens_mistral': 840, 'n_tokens_neox': 795, 'n_words': 160}