### Question:
ModelComposition { public static Map<VertexLabel, Vertex> composeModel(BayesianNetwork bayesianNetwork, Map<VertexLabel, Vertex> inputVertices, List<VertexLabel> desiredOutputs) { Map<VertexLabel, Vertex> outputMap = extractOutputs(bayesianNetwork, desiredOutputs); increaseDepth(bayesianNetwork, outputMap); checkAndLinkInputs(bayesianNetwork, inputVertices); cleanOutputLabels(outputMap); return outputMap; } private  ModelComposition(); static Map<VertexLabel, Vertex> composeModel(BayesianNetwork bayesianNetwork,
                                                        Map<VertexLabel, Vertex> inputVertices,
                                                        List<VertexLabel> desiredOutputs);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void willRejectProxyWithParent() { DoubleProxyVertex proxy = new DoubleProxyVertex(new VertexLabel("Input1")); DoubleVertex output = new GaussianVertex(proxy, 1.0); output.setLabel("Output1"); DoubleVertex outerInput = new UniformVertex(-1.0, 1.0); DoubleVertex invalidParent = new ConstantDoubleVertex(0.0); proxy.setParent(invalidParent); BayesianNetwork bayesNet = new BayesianNetwork(output.getConnectedGraph()); ModelComposition.composeModel(bayesNet, ImmutableMap.of(new VertexLabel("Input1"), outerInput), ImmutableList.of(new VertexLabel("Output1"))); }