/*
 * Copyright 2017 Philipp Salvisberg <philipp.salvisberg@trivadis.com>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.salvis.emptracker.tests;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.junit4.SpringRunner;

import com.salvis.emptracker.AppConfig;

import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;

@RunWith(SpringRunner.class)
@SpringBootTest
@Import(AppConfig.class)
public class TweetTest {
	
	@Autowired
	private Twitter twitter;

	@Test
	public void postTweet() throws TwitterException {
		String text = "SCOTT got a pay raise of $150. Making $3000 a month now. Congrats.";
		Status status = twitter.updateStatus(text);
		Assert.assertEquals(text, status.getText());
	}

}

@@ -691,37 +691,30 @@
 nit.
-Assert;%0Aimport org.junit.Test
+jupiter.api.Assertions
 ;%0Aim
@@ -732,22 +732,24 @@
 nit.
-runner.RunWith
+jupiter.api.Test
 ;%0Aim
@@ -927,69 +927,8 @@
 ort;
-%0Aimport org.springframework.test.context.junit4.SpringRunner;
 %0A%0Aim
@@ -970,33 +970,8 @@
 g;%0A%0A
-import twitter4j.Status;%0A
 impo
@@ -1031,53 +1031,77 @@
 on;%0A
-%0A@RunWith(SpringRunner.class)%0A@SpringBootTest
+import twitter4j.v1.Status;%0A%0A@SpringBootTest(classes=AppConfig.class)
 %0A@Im
@@ -1289,17 +1289,17 @@
 ise of $
-1
+2
 50. Maki
@@ -1303,17 +1303,17 @@
 aking $3
-0
+1
 00 a mon
@@ -1358,16 +1358,30 @@
 twitter.
+v1().tweets().
 updateSt
@@ -1400,16 +1400,20 @@
 %09%09Assert
+ions
 .assertE

use JUnit 5 instead of Junit 4 and twitter4j 4.1 API