DesignDocument found = manager.getDesignDocument("insert1");
assertNotNull(found);
assertEquals("insert1", found.name());
assertEquals(1, found.views().size());
assertEquals("function(d,m){}", found.views().get(0).map());
assertEquals("_count", found.views().get(0).reduce());
}
@Test(expected = DesignDocumentException.class)
public void shouldFailOnInvalidMapFunction() {
List<View> views = Arrays.asList(DefaultView.create("v1", "notValid"));