diff --git a/src/test/java/org/example/StudentTest.java b/src/test/java/org/example/StudentTest.java index 28b48b6..034f426 100644 --- a/src/test/java/org/example/StudentTest.java +++ b/src/test/java/org/example/StudentTest.java @@ -72,12 +72,11 @@ class StudentTest { @Test void testPrintStudentInfo() { - Student student = sampleStudent; ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); System.setOut(new PrintStream(outputStream)); - student.printStudentInfo(); + sampleStudent.printStudentInfo(); String printedOutput = outputStream.toString().trim();