Automating the generation of object-oriented unit tests is a challenging task. This is mainly due to the complexity and peculiarities that the principles of object-orientation imply. One of these principles is the encapsulation of class members which prevents non-public methods and attributes of the class under test from being freely accessed. This paper suggests an improvement of our automated search-based test generation approach which particularly addresses the test of non-public methods. We extend our objective functions by an additional component that accounts for encapsulation. Additionally, we propose a modification of the search space which increases the efficiency of the approach. The value of the improvement in terms of achieved code coverage is demonstrated by a case study with 7 realworld test objects. In contrast to other approaches which break encapsulation in order to test non-public methods, the tests generated by our approach inherently guarantee that class invariant...