Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java spring set private field in test

import org.springframework.test.util.ReflectionTestUtils;

ReflectionTestUtils.setField(notificationService, "timeToLive", 90L);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #spring #set #private #field #test
ADD COMMENT
Topic
Name
1+3 =