ParticleVector { public void add(ParticleVector vector) { Double value = list.get(0) + vector.getX(); list.set(0, value); value = list.get(1) + vector.getY(); list.set(1, value); } ParticleVector();  ParticleVector(double vectorX, double vectorY); void add(ParticleVector vector); void set(double vectorX, double vectorY); Double getX(); Double getY(); @Override boolean equals(Object object); @Override int hashCode();  }
@Test public void testAdd() { ParticleVector vector1 = new ParticleVector(10, 10); ParticleVector vector2 = new ParticleVector(10, 10); vector1.add(vector2); Assert.assertEquals(new ParticleVector(20, 20), vector1); }