### Question:
AbstractVectorCreator implements VectorCreator { @Override public SubsetVectors[] getVectors(String[][] wordsets, SegmentationDefinition[] definitions) { SubsetProbabilities probabilities[] = supplier.getProbabilities(wordsets, definitions); return createVectors(wordsets, definitions, probabilities); } AbstractVectorCreator(ProbabilityEstimator supplier); @Override SubsetVectors[] getVectors(String[][] wordsets, SegmentationDefinition[] definitions); @Override String getProbabilityEstimatorName(); @Override String getVectorSpaceName(); @Override void setMinFrequency(int minFrequency); void setProbabilityEstimator(ProbabilityEstimator supplier);  }### Answer:
@Test public void test() { SegmentationDefinition definitions[] = new SegmentationDefinition[probabilities.length]; for (int i = 0; i < definitions.length; ++i) { definitions[i] = subsetCreator.getSubsetDefinition(wordsetSize); } SubsetVectors vectors[] = vectorCreator.getVectors(new String[probabilities.length][wordsetSize], definitions); for (int i = 0; i < probabilities.length; ++i) { Assert.assertEquals(expectedVectors[i].length, vectors[i].vectors.length); for (int j = 0; j < expectedVectors[i].length; ++j) { Assert.assertArrayEquals("Vector " + j + " of wordset " + i + " is not equal to the expected one.", expectedVectors[i][j], vectors[i].vectors[j], DOUBLE_PRECISION_DELTA); } } }