In general (meaning exceptions are allowed under well defined circumstances), a field of a class should be private, and any access to it will require the use of a getter or a setter (or, more general, an 'accessor' or a 'mutator').
One (well known) exception is for static final fields of an immutable or primitive type – sometimes referred to as a constant.
When you can make sure (really sure) that your code is the only one that will access that field (for now and all overseeable future), you may consider to make it public (rarely), package private or protected. You will find this pattern quite often in classes from the java and javax packages; it works there because you cannot place your new classes to one of these packages, and therefore the code in your class cannot access the package private and protected fields – and because the (abstract) base classes in these packages that have protected fields are itself not public, inheritance would not help.
It will not work in most other cases (although things are changing since Jigsaw …), so you are limited to private internal classes in these cases.
Of course, when you write only disposable code, considerations like these are obsolete. Otherwise, you should always completely encapsulate all data, so that you/your code has complete control over any access/modification of it.
protected String testField;would be sufficient.