From 7d3302f52b876357bcb063f92daf58849cfc6822 Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Tue, 30 Oct 2018 10:20:37 -0600 Subject: [PATCH] Polish Test Name So that it adheres to methodNameWhenConditionThenVerification naming convention. Issue: gh-3743 --- ...ultMethodSecurityExpressionHandlerTests.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/core/src/test/java/org/springframework/security/access/expression/method/DefaultMethodSecurityExpressionHandlerTests.java b/core/src/test/java/org/springframework/security/access/expression/method/DefaultMethodSecurityExpressionHandlerTests.java index a4b232874c..2cdc31a178 100644 --- a/core/src/test/java/org/springframework/security/access/expression/method/DefaultMethodSecurityExpressionHandlerTests.java +++ b/core/src/test/java/org/springframework/security/access/expression/method/DefaultMethodSecurityExpressionHandlerTests.java @@ -15,10 +15,9 @@ */ package org.springframework.security.access.expression.method; -import static org.assertj.core.api.Assertions.*; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.*; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; import org.aopalliance.intercept.MethodInvocation; import org.junit.After; @@ -27,14 +26,18 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; + import org.springframework.expression.EvaluationContext; import org.springframework.expression.Expression; import org.springframework.security.authentication.AuthenticationTrustResolver; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; -import java.util.List; -import java.util.stream.*; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; @RunWith(MockitoJUnitRunner.class) public class DefaultMethodSecurityExpressionHandlerTests { @@ -77,7 +80,7 @@ public class DefaultMethodSecurityExpressionHandlerTests { @Test @SuppressWarnings("unchecked") - public void testFilteringStream() { + public void filterWhenUsingStreamThenFiltersStream() { final Stream stream = Stream.of("1", "2", "3"); Expression expression = handler.getExpressionParser().parseExpression("filterObject ne '2'");