Java Spring Set Private Field в тестировании
import org.springframework.test.util.ReflectionTestUtils;
ReflectionTestUtils.setField(notificationService, "timeToLive", 90L);
DevPedrada