import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.Test;

class BoxTest {

    @Test
    void newBoxIsEmpty() {
        Box<String> box = new Box<>();
        assertTrue(box.isEmpty());
    }

    @Test
    void returnsWhatWasPut() {
        Box<String> box = new Box<>();
        box.put("Lima");
        assertFalse(box.isEmpty());
        assertEquals("Lima", box.get());
    }

    @Test
    void worksWithOtherTypes() {
        Box<Integer> box = new Box<>();
        box.put(7);
        int n = box.get();
        assertEquals(7, n);
    }
}
