My mistake, I thought you were comparing the list of owners on the server (`segment`?) with the list of owners on the client (`members`?). So a slightly more correct version of what I was expecting would be something like this:

         val responseServerAddresses = hashTopologyResp.segments(i)
         val embeddedOwners = ch.locateOwnersForSegment(i)
         val mappedEmbeddedOwners = embeddedOwners.take(2).map(ea => servers.find(s => s.getCacheManager().getAddress().equals(ea)).get.getAddress)
         assertEquals(mappedEmbeddedOwners, responseServerAddresses)

Of course, I couldn't get the code to compile, but if you got it to work then I think it would be clearer :) And you could also adjust it to consider only the first 2 embedded owners.