"codebase property already set" when running ESIntegTestCase

You can not run elasticsearch embedded. Read this blog post.

Note that to run integration tests (not unit tests) you would probably prefer running that in something close to a production environment, like a real elasticsearch server instance. I shared some ideas about integration testing in this thread: In memory testing with RestHighLevelClient