// Path: src/main/java/com/hackerrank/ElectronicsShop.java
// static int getMoneySpent(int[] keyboards, int[] drives, int s) {
//     int max = -1;
//     for (int keyboard : keyboards) {
//         for (int drive : drives) {
//             int current = keyboard + drive;
//             if (current <= s && current > max) {
//                 max = current;
//             }
//         }
//     }
//     return max;
// }


import org.junit.Test;
import static com.hackerrank.ElectronicsShop.getMoneySpent;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
package com.hackerrank;



public class ElectronicsShopTest {

    @Test
    public void firstTestCase() {
// Path: src/main/java/com/hackerrank/ElectronicsShop.java
// static int getMoneySpent(int[] keyboards, int[] drives, int s) {
//     int max = -1;
//     for (int keyboard : keyboards) {
//         for (int drive : drives) {
//             int current = keyboard + drive;
//             if (current <= s && current > max) {
//                 max = current;
//             }
//         }
//     }
//     return max;
// }


// Path: src/test/java/com/hackerrank/ElectronicsShopTest.java
import org.junit.Test;
import static com.hackerrank.ElectronicsShop.getMoneySpent;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;

package com.hackerrank;



public class ElectronicsShopTest {

    @Test
    public void firstTestCase() {
        assertThat(getMoneySpent(new int[]{3, 1}, new int[]{5, 2, 8}, 10)).isEqualTo(9);