"But when the Helper comes, whom I shall send to you from the Father, the Spirit of truth who proceeds from the Father, He will testify of Me. And you also will bear witness, because you have been with Me from the beginning. These things I have spoken to you, that you should not be made to stumble. They will put you out of the synagogues; yes, the time is coming that whoever kills you will think that he offers God service. And these things they will do to you because they have not known the Father nor Me. But these things I have told you, that when the time comes, you may remember that I told you of them. And these things I did not say to you at the beginning, because I was with you" (John 15:26-16:4).
One of the fundamental purposes of the Spirit's coming would be to testify of Jesus. He would testify through the apostles and other messengers (e.g., Acts 2:4). The apostles would also personally bear witness since they had all been with Jesus from the beginning of His ministry (i.e., from the baptism of John; cf. Acts 1:21,22). Thus, in a sense they would be double witnesses. They could personally testify to what they had seen and heard and the Holy Spirit would aid them to testify accurately as to the real meaning of Jesus' words, especially those matters that they did not currently understand. Additionally, the Spirit would continue to empower them to confirm the words that they spoke with miracles.
Let it be observed that no person on Earth today can be a witness for Jesus, though many unknowingly claim otherwise. No one alive today has seen Jesus or heard Him teach, and no one alive today worked with Him during His personal ministry (or followed Him from the beginning of it; cf. Acts 1:22; I Cor. 15:8). One can not truly be a witness or give testimony regarding that which he has not personally seen or heard. However, every Christian should be teaching others of the confirmed words of truth that are recorded in the New Testament (cf. I Tim. 2:2).
As John 16 begins, Jesus warned His disciples of coming persecutions in order to prevent such from destroying their faith. Some today stumble because they do not know what to expect in the Christian life; they do not foresee trials (cf. I Pet. 4:12). Some falter because they fail to count the cost of commitment to Christ (cf. Luke 14:25-33). Jesus warned His followers what to expect so they could count the cost and foresee the trials that were coming, that they might not "stumble."
"They will put you out of the synagogues" (e.g., John 9:22). Once the distinction between Judaism and Christianity became clear to Jesus' disciples, this punishment would not be serious, though it would hinder some evangelistic opportunities.
"The time is coming that whoever kills you will think that he offers God service" (e.g., Acts 9:1; 26:9-11; Gal. 1:13,14). Not only would persecutors take away religious privileges, but even life itself. They would do this as a religious act, for they viewed Christians as enemies of God (and they certainly thought God would take pleasure in the death of His enemies). Those who persecuted Christians would do so because of their ignorance of the Father and the Son (and His mission). However, ignorance was no excuse since they should have known better.
"And these things I did not say to you at the beginning, because I was with you" - Jesus did warn His followers of persecution at the beginning of His ministry (e.g., Matt. 5:10-12; 10:17-28), thus "these things" to which Jesus here refers must be broader than the warning of persecution. Contextually, it appears that Jesus is also referring to the fact that He will depart from Earth, return to heaven, and send the Holy Spirit as a Comforter. He had not told them "these things" from the beginning for there was no reason to do so. They did not need to be knowledgeable of His departure at the beginning of His ministry. Such would have unnecessarily discouraged them while they were at their weakest.