### Question:
InstanceOutputAttributesSelector extends AbstractMOAObject implements InstanceTransformer { @Override public Prediction targetPredictionToSource(Prediction targetPrediction) { Prediction sourcePrediction=new MultiLabelPrediction(this.numSourceInstancesOutputs); for (int i=0; i<targetPrediction.numOutputAttributes();i++){ sourcePrediction.setVotes(this.targetOutputIndices[i], targetPrediction.getVotes(i)); } return sourcePrediction; } InstanceOutputAttributesSelector();  InstanceOutputAttributesSelector(InstancesHeader sourceInstances, int [] targetOutputIndices); @Override Instance sourceInstanceToTarget(Instance sourceInstance); @Override Prediction targetPredictionToSource(Prediction targetPrediction); @Override void getDescription(StringBuilder sb, int indent); public InstancesHeader targetInstances; public int [] targetOutputIndices; public int numSourceInstancesOutputs; }### Answer:
@Test public void testTargetPredictionToSource() { Prediction targetPred= new MultiLabelPrediction(2); targetPred.setVotes(0, new double []{0.5}); targetPred.setVotes(1, new double []{1.5}); Prediction pred=transformer.targetPredictionToSource(targetPred); assertEquals(0.5, pred.getVotes(0)[0], EPS); assertTrue(pred.getVotes(1).length==0); assertEquals(1.5, pred.getVotes(2)[0], EPS); }