expect(this.connection.isClosed()).andReturn(false);
expect(this.connection.createObject()).andAnswer(new IAnswer<CouchDBObject>() {
@Override
public CouchDBObject answer() throws Throwable {
return new CouchDBObject();
}
}).atLeastOnce();
expect(this.connection.createList(anyInt())).andAnswer(new IAnswer<CouchDBObject[]>() {
@Override
public CouchDBObject[] answer() throws Throwable {
return new CouchDBObject[(Integer) getCurrentArguments()[0]];
}
});
expect(this.connection.createObject()).andAnswer(new IAnswer<CouchDBObject>() {
@Override
public CouchDBObject answer() throws Throwable {
return new CouchDBObject();
}
}).atLeastOnce();
expect(this.connection.createList(anyInt())).andAnswer(new IAnswer<CouchDBObject[]>() {
@Override
public CouchDBObject[] answer() throws Throwable {
return new CouchDBObject[(Integer) getCurrentArguments()[0]];
}
});
expect(this.connection.createObject()).andAnswer(new IAnswer<CouchDBObject>() {
@Override
public CouchDBObject answer() throws Throwable {
return new CouchDBObject();
}
}).atLeastOnce();
expect(event.getLevel()).andReturn(Level.DEBUG);
expect(event.getLoggerName()).andReturn("com.foo.NoSQLDbTest.testWriteInternal02");
expect(event.getMessage()).andReturn(message).times(2);