We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4dd4885 commit e4df1cfCopy full SHA for e4df1cf
1 file changed
src/test/java/com/thealgorithms/stacks/NearestElementTest.java
@@ -48,13 +48,11 @@ void testNearestSmallerToLeft() {
48
49
@Test
50
void testPrivateConstructor() throws Exception {
51
- Constructor<NearestElement> constructor
52
- = NearestElement.class.getDeclaredConstructor();
+ Constructor<NearestElement> constructor = NearestElement.class.getDeclaredConstructor();
53
constructor.setAccessible(true);
54
try {
55
constructor.newInstance();
56
} catch (Exception ignored) {
57
- // Expected exception: constructor throws UnsupportedOperationException
58
}
59
60
0 commit comments