### Question:
ProbabilitiesConvertor { public static float[][] convertBiallelicComplexProbabilitiesToProbabilities(double[][] complexProbabilities) { float[][] probabilities = new float[complexProbabilities.length][3]; for (int sampleIndex = 0; sampleIndex < complexProbabilities.length; sampleIndex++) { double[] sampleProbabilitiesBgen = complexProbabilities[sampleIndex]; int probabilitiesArrayLength = sampleProbabilitiesBgen.length; float[] sampleProbabilities = new float[3]; if (probabilitiesArrayLength == 3) { IntStream.range(0, probabilitiesArrayLength) .forEach(index -> sampleProbabilities[index] = (float) sampleProbabilitiesBgen[index]); } probabilities[sampleIndex] = sampleProbabilities; } return probabilities; }  static float[][] convertCalledAllelesToProbability(List<Alleles> sampleAlleles, Alleles alleles); static float[][] convertDosageToProbabilityHeuristic(float[] sampleDosages); static List<Alleles> convertProbabilitiesToAlleles(float[][] probs, Alleles variantAlleles, double minProbability); static float[] convertProbabilitiesToDosage(float[][] probs, double minProbability); static float[][] convertBiallelicComplexProbabilitiesToProbabilities(double[][] complexProbabilities); static double[][] convertProbabilitiesToComplexProbabilities(float[][] probabilities); static double[][] convertPhasedProbabilitiesToComplexProbabilities(double[][][] haplotypeProbabilities); static double[][][] haplotypeDosagesToHaplotypeProbabilities(double[][] haplotypeDosages); static double[][][] convertCalledAllelesToPhasedProbabilities(List<Alleles> sampleAlleles, Alleles alleles); static double[][] convertCalledAllelesToComplexProbabilities(
    		List<Alleles> allelesPerSample, Alleles variantAlleles);  }### Answer:
@Test public void testBiallelicComplexProbabilitiesToProbabilities() { System.out.println("convertBiallelicComplexProbabilitiesToProbabilities"); double[][] probs = new double[6][]; probs[0] = new double[]{1, 0}; probs[1] = new double[]{1, 0, 0}; probs[2] = new double[]{0, 1, 0}; probs[3] = new double[]{0, 1, 0}; probs[4] = new double[]{0, 0, 1}; probs[5] = new double[]{1, 0, 0, 0}; float[][] expectedProbs = new float[6][]; expectedProbs[0] = new float[]{0, 0, 0}; expectedProbs[1] = new float[]{1, 0, 0}; expectedProbs[2] = new float[]{0, 1, 0}; expectedProbs[3] = new float[]{0, 1, 0}; expectedProbs[4] = new float[]{0, 0, 1}; expectedProbs[5] = new float[]{0, 0, 0}; float[][] actualProbabilities = ProbabilitiesConvertor .convertBiallelicComplexProbabilitiesToProbabilities(probs); for (int i = 0; i < actualProbabilities.length; i++) { float[] actualProbs = actualProbabilities[i]; assertEquals(actualProbs, expectedProbs[i]); } }