import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; class KnapsackTest { @Test void test() { int[] w = { 1, 4, 8 }; int W = 10; assertEquals(9, Knapsack.optimalWeight(W, w)); } }