### Question:
SequenceLoader { public static Map<Integer, Sequence> loadMultipleSequencesFromBayesNet(BayesianNetwork network) { return loadSequences(network, true); }  static Sequence loadFromBayesNet(BayesianNetwork network); static Map<Integer, Sequence> loadMultipleSequencesFromBayesNet(BayesianNetwork network);  }### Answer:
@Test public void youCanConstructManySequenceItems() throws IOException { VertexLabel x1Label = new VertexLabel("x1"); VertexLabel x2Label = new VertexLabel("x2"); VertexLabel outputLabel = new VertexLabel("OUTPUT"); String sequence1Label = "Sequence_1"; String sequence2Label = "Sequence_2"; Sequence sequence1 = constructSimpleSequence(sequence1Label, x1Label); Sequence sequence2 = constructSimpleSequence(sequence2Label, x2Label); DoubleVertex output1 = sequence1.getLastItem().get(x1Label); DoubleVertex output2 = sequence2.getLastItem().get(x2Label); DoubleVertex masterOutput = output1.multiply(output2).setLabel(outputLabel); BayesianNetwork network = new BayesianNetwork(masterOutput.getConnectedGraph()); ByteArrayOutputStream writer = new ByteArrayOutputStream(); ProtobufSaver saver = new ProtobufSaver(network); saver.save(writer, true); ProtobufLoader loader = new ProtobufLoader(); BayesianNetwork reconstructedNetwork = loader.loadNetwork(new ByteArrayInputStream(writer.toByteArray())); Collection<Sequence> reconstructedSequences = SequenceLoader.loadMultipleSequencesFromBayesNet(reconstructedNetwork).values(); Sequence reconstructedSequence1 = getSequenceAndCheckNotNull(reconstructedSequences, sequence1Label); Sequence reconstructedSequence2 = getSequenceAndCheckNotNull(reconstructedSequences, sequence2Label); assertThat(reconstructedSequences.size(), is(2)); assertThat(reconstructedSequence1.getUniqueIdentifier(), is(sequence1.getUniqueIdentifier())); assertThat(reconstructedSequence2.getUniqueIdentifier(), is(sequence2.getUniqueIdentifier())); assertThat(reconstructedSequence1.size(), is(2)); assertThat(reconstructedSequence2.size(), is(2)); assertThat(reconstructedSequence1.getName(), is(sequence1Label)); assertThat(reconstructedSequence2.getName(), is(sequence2Label)); VertexLabel x1ProxyLabel = SequenceBuilder.proxyLabelFor(x1Label); VertexLabel x2ProxyLabel = SequenceBuilder.proxyLabelFor(x2Label); assertSequenceContains(sequence1, reconstructedSequence1, x1Label, x1ProxyLabel); assertSequenceContains(sequence2, reconstructedSequence2, x2Label, x2ProxyLabel); BayesianNetwork reconstructedNetwork1 = sequence1.toBayesianNetwork(); Vertex reconstructedMasterOutput = reconstructedNetwork1.getVertexByLabel(outputLabel); assertThat(reconstructedMasterOutput, notNullValue()); assertThat(((DoubleTensor) reconstructedMasterOutput.getValue()).scalar(), is(16.0)); }