@@ -0,0 +1,1371 @@
+package com.github.pedrovgs.app.problem2;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A/**%0A * @author Pedro Vicente G%C3%B3mez S%C3%A1nchez.%0A */%0Apublic class VectorScalarProductTest %7B%0A%0A  private VectorScalarProduct vectorScalarProduct;%0A%0A  @Before public void setUp() %7B%0A    vectorScalarProduct = new VectorScalarProduct();%0A  %7D%0A%0A  @Test(expected = IllegalArgumentException.class)%0A  public void differentSizeVectorsShouldThrowException() %7B%0A    Vector v1 = new Vector(1, 2, 3, 4);%0A    Vector v2 = new Vector(1, 2);%0A%0A    vectorScalarProduct.calculateScalarProduct(v1, v2);%0A  %7D%0A%0A  @Test public void shouldReturnZeroIfOneVectorIsFullOfZeros() %7B%0A    Vector v1 = new Vector(1, 2, 3, 4);%0A    Vector v2 = new Vector(0, 0, 0, 0);%0A%0A    int result = vectorScalarProduct.calculateScalarProduct(v1, v2);%0A%0A    assertEquals(0, result);%0A  %7D%0A%0A  @Test public void shouldReturnSumOfOneVectorIfOtherIsFullOfOnes() %7B%0A    Vector v1 = new Vector(2, 2, 2, 2);%0A    Vector v2 = new Vector(1, 1, 1, 1);%0A%0A    int result = vectorScalarProduct.calculateScalarProduct(v1, v2);%0A%0A    assertEquals(8, result);%0A  %7D%0A%0A  @Test public void shouldTakeIntoAccountNegativeElements() %7B%0A    Vector v1 = new Vector(2, 2, 2, 2);%0A    Vector v2 = new Vector(-1, 1, -1, -1);%0A%0A    int result = vectorScalarProduct.calculateScalarProduct(v1, v2);%0A%0A    assertEquals(-2, result);%0A  %7D%0A%7D%0A

Add tests for problem 2.