MixTankSimulation extends MixTank { public void putIn(LinkedList<Liquid> input) { input.addFirst(this.getLiquid()); this.setLiquid(mixingStrategy.mixLiquids(input)); } MixTankSimulation(float capacity, Liquid liquid, Pipe outPipe); void putIn(LinkedList<Liquid> input); Liquid takeOut(float amount);  }
@Test public void testPutIn() { Liquid content = new Liquid(100, 350, new Color(0x003000)); MixTankSimulation tank = new MixTankSimulation(1000, content, pipe); LinkedList<Liquid> input = new LinkedList<>(); input.add(new Liquid(100, 375, new Color(0x000000))); input.add(new Liquid(100, 400, new Color(0x300000))); tank.putIn(input); assertEquals(new Liquid(300, 375, new Color(0x101000)), tank.getLiquid()); }