@Test
  public void testDeserializeZipArchiveSimple() throws Exception {
    // produce a zip archive containing a single serialized stream for this test.
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    ZipArchiveOutputStream zipOut = new ZipArchiveOutputStream(baos);
    ZipArchiveEntry zipEntry = new ZipArchiveEntry(StreamId.APPLICATION_VERSION.name());
    zipOut.putArchiveEntry(zipEntry);
    IOUtils.copy(APPLICATION_VERSION_1.getInputStream(), zipOut);
    zipOut.closeArchiveEntry();
    zipOut.close();

    state = new PackageState();
    when(mockedMarshallerMap
            .get(StreamId.APPLICATION_VERSION)
            .getUnmarshaller()
            .unmarshal(any(Source.class)))
        .thenReturn(applicationVersion);
    ByteArrayInputStream zipIn = new ByteArrayInputStream(baos.toByteArray());
    underTest.deserialize(state, StreamId.APPLICATION_VERSION, zipIn);

    assertNotNull(state.getCreationToolVersion());
    assertEquals(applicationVersion, state.getCreationToolVersion());
    verify(mockedMarshallerMap.get(StreamId.APPLICATION_VERSION).getUnmarshaller())
        .unmarshal(any(Source.class));
  }
 @Test
 public void testDeserializeSimple() throws Exception {
   state = new PackageState();
   when(mockedMarshallerMap
           .get(StreamId.APPLICATION_VERSION)
           .getUnmarshaller()
           .unmarshal(any(Source.class)))
       .thenReturn(applicationVersion);
   underTest.deserialize(
       state,
       StreamId.APPLICATION_VERSION,
       new BufferedInputStream(APPLICATION_VERSION_1.getInputStream()));
   assertNotNull(state.getCreationToolVersion());
   assertEquals(applicationVersion, state.getCreationToolVersion());
   verify(mockedMarshallerMap.get(StreamId.APPLICATION_VERSION).getUnmarshaller())
       .unmarshal(any(Source.class));
 }