Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
*/
package org.apache.hadoop.hdfs.tools;

import org.junit.Assert;
import org.junit.Test;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

/**
* Test class to test Admin Helper.
Expand All @@ -28,11 +30,10 @@ public class TestAdminHelper {
@Test
public void prettifyExceptionWithNpe() {
String pretty = AdminHelper.prettifyException(new NullPointerException());
Assert.assertTrue(
assertTrue(pretty.startsWith("NullPointerException at org.apache.hadoop.hdfs.tools"
+ ".TestAdminHelper.prettifyExceptionWithNpe"),
"Prettified exception message doesn't contain the required exception "
+ "message",
pretty.startsWith("NullPointerException at org.apache.hadoop.hdfs.tools"
+ ".TestAdminHelper.prettifyExceptionWithNpe"));
+ "message");
}

@Test
Expand All @@ -42,7 +43,7 @@ public void prettifyException() {
new IllegalArgumentException("Something is wrong",
new IllegalArgumentException("Something is illegal")));

Assert.assertEquals(
assertEquals(
"IllegalArgumentException: Something is wrong",
pretty);

Expand Down
Loading