### Question:
CoverageService { void incrementValueForFunctionalityProperties(int[] values, List<String[]> functionalityValuePoints, List<AxisDTO> axes) { incrementValueForFunctionalityProperties(values, functionalityValuePoints, axes, new int[axes.size()], 0); }  CoverageDTO computeCoverage(long projectId);  }### Answer:
@Test public void incrementValueForFunctionalityProperties_should_increment_all_and_value_points() { List<String[]> functionalityValuePoints = Arrays.asList( new String[] { "A" }, new String[] { "1", "3" }); List<AxisDTO> axes = Arrays.asList( new AxisDTO().withPoints(Arrays.asList( AxisPointDTO.ALL, new AxisPointDTO().withId("A"), new AxisPointDTO().withId("B"))), new AxisDTO().withPoints(Arrays.asList( AxisPointDTO.ALL, new AxisPointDTO().withId("1"), new AxisPointDTO().withId("2"), new AxisPointDTO().withId("3")))); int[] values = new int[3 * 4]; cut.incrementValueForFunctionalityProperties(values, functionalityValuePoints, axes); assertThat(values).containsExactly( 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0); }
@Test public void incrementValueForFunctionalityProperties_should_increment_only_all_when_value_points_are_null() { List<String[]> functionalityValuePoints = Collections.singletonList(null); List<AxisDTO> axes = Collections.singletonList( new AxisDTO().withPoints(Arrays.asList( AxisPointDTO.ALL, new AxisPointDTO().withId("A")))); int[] values = new int[2]; cut.incrementValueForFunctionalityProperties(values, functionalityValuePoints, axes); assertThat(values).containsExactly( 1, 0 ); }