expect(libDir.exists()).andReturn(true);
expect(libDir.listFiles()).andReturn(new File[]{fileEntry});
expect(fileEntry.toURI()).andReturn(new URI("file:./"));
Capture<ViewEntity> captureViewEntity = new Capture<ViewEntity>();
expect(vDAO.findByName("MY_VIEW{1.0.0}")).andReturn(null);
<BUG>vDAO.create(capture(captureViewEntity));
expectLastCall().andThrow(new IllegalArgumentException("Expected exception."));
</BUG>
expect(vDAO.findAll()).andReturn(Collections.<ViewEntity>emptyList());
replay(configuration, viewDir, extractedArchiveDir, viewArchive, archiveDir, entryFile, classesDir,

expect(libDir.exists()).andReturn(true);
expect(libDir.listFiles()).andReturn(new File[]{fileEntry});
expect(fileEntry.toURI()).andReturn(new URI("file:./"));
Capture<ViewEntity> captureViewEntity = new Capture<ViewEntity>();
expect(vDAO.findByName("MY_VIEW{1.0.0}")).andReturn(null);
expect(vDAO.merge(capture(captureViewEntity))).andReturn(null);
expect(vDAO.findAll()).andReturn(Collections.<ViewEntity>emptyList());
replay(configuration, viewDir, extractedArchiveDir, viewArchive, archiveDir, entryFile, classesDir,
