### Question:
CassandraLog4JManager extends AbstractManager { void ensureBasicSchema(CqlSession session) { session.setSchemaMetadataEnabled(false); session.execute(CREATE_LOG_KEYSPACE); session.execute(CREATE_LOG_TABLE); session.execute(CREATE_FT_TABLE); session.execute(FTI_STATUS_INDEX); session.execute(FTI_SCANNER_INDEX); session.setSchemaMetadataEnabled(true); session.checkSchemaAgreement(); } protected  CassandraLog4JManager(String name); boolean isReady(); static final String CREATE_LOG_KEYSPACE; static final String CREATE_LOG_TABLE; static final String CREATE_FT_TABLE; static final String UPGRADE_FT_TABLE_ADD_COL; static final String FTI_STATUS_INDEX; static final String FTI_SCANNER_INDEX; }### Answer:
@Test public void testEnsureBasicSchema() { expect(sessionMock.setSchemaMetadataEnabled(false)).andReturn(csMock); expect(sessionMock.execute(CREATE_LOG_KEYSPACE)).andReturn(null); expect(sessionMock.execute(CREATE_LOG_TABLE)).andReturn(null); expect(sessionMock.execute(CREATE_FT_TABLE)).andReturn(null); expect(sessionMock.execute(FTI_STATUS_INDEX)).andReturn(null); expect(sessionMock.execute(FTI_SCANNER_INDEX)).andReturn(null); expect(sessionMock.setSchemaMetadataEnabled(true)).andReturn(csMock); expect(sessionMock.checkSchemaAgreement()).andReturn(true); replay(); manager.ensureBasicSchema(sessionMock); }