@@ -113,14 +113,13 @@ Working with the repository instance is a matter of injecting the repository as
113113====
114114[source,java]
115115----
116- @RunWith(SpringRunner.class)
117- @ContextConfiguration
118- public class PersonRepositoryTests {
116+ @ExtendWith(SpringExtension.class)
117+ class PersonRepositoryTests {
119118
120119 @Autowired PersonRepository repository;
121120
122121 @Test
123- public void readsPersonTableCorrectly() {
122+ void readsPersonTableCorrectly() {
124123
125124 List<Person> persons = repository.findAll();
126125 assertThat(persons.isEmpty()).isFalse();
@@ -138,14 +137,13 @@ The following example shows how to set up paging access to `Person` entities:
138137====
139138[source,java]
140139----
141- @RunWith(SpringRunner.class)
142- @ContextConfiguration
143- public class PersonRepositoryTests {
140+ @ExtendWith(SpringExtension.class)
141+ class PersonRepositoryTests {
144142
145143 @Autowired PersonRepository repository;
146144
147145 @Test
148- public void readsPagesCorrectly() {
146+ void readsPagesCorrectly() {
149147
150148 Slice<Person> firstBatch = repository.findAll(CassandraPageRequest.first(10));
151149
@@ -176,7 +174,7 @@ The following example shows a number of such method declarations:
176174====
177175[source,java]
178176----
179- public interface PersonRepository extends CrudRepository<Person, String> {
177+ interface PersonRepository extends CrudRepository<Person, String> {
180178
181179 List<Person> findByLastname(String lastname); <1>
182180
@@ -328,7 +326,7 @@ The following example sets the consistency level to `ConsistencyLevel.LOCAL_ONE`
328326====
329327[source,java]
330328----
331- public interface PersonRepository extends CrudRepository<Person, String> {
329+ interface PersonRepository extends CrudRepository<Person, String> {
332330
333331 @Consistency(ConsistencyLevel.LOCAL_ONE)
334332 List<Person> findByLastname(String lastname);
0 commit comments