### Question:
CoverageService { int[] computeValues(Collection<Functionality> functionalities, List<AxisDTO> axes, List<AxisGenerator> axisGenerators) { int[] values = new int[axes.stream().mapToInt(axis -> axis.getPoints().size()).reduce(1, Math::multiplyExact)]; for (Functionality functionality : functionalities) { List<String[]> functionalityValuePoints = new ArrayList<>(); for (AxisGenerator axisGenerator : axisGenerators) { functionalityValuePoints.add(axisGenerator.getValuePoints(functionality)); } incrementValueForFunctionalityProperties(values, functionalityValuePoints, axes); } return values; }  CoverageDTO computeCoverage(long projectId);  }### Answer:
@Test public void computeValues_should_increment_all_and_value_points() { final Functionality functionality = new Functionality(); List<Functionality> functionalities = Collections.singletonList(functionality); when(generator1.getValuePoints(functionality)).thenReturn(new String[] { "A" }); when(generator2.getValuePoints(functionality)).thenReturn(new String[] {}); List<AxisGenerator> axisGenerators = Arrays.asList( generator1, generator2); 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")))); int[] values = cut.computeValues(functionalities, axes, axisGenerators); assertThat(values).containsExactly( 1, 1, 0, 0, 0, 0); }