22
33import com .mastercard .developer .encryption .EncryptionException ;
44import com .mastercard .developer .encryption .FieldLevelEncryptionConfig ;
5- import com .mastercard .developer .interceptors .FeignFieldLevelEncryptionEncoder ;
5+ import com .mastercard .developer .interceptors .OpenFeignFieldLevelEncryptionEncoder ;
66import com .mastercard .developer .test .TestUtils ;
77import feign .RequestTemplate ;
88import feign .codec .EncodeException ;
99import feign .codec .Encoder ;
10- import org .junit .Assert ;
1110import org .junit .Rule ;
1211import org .junit .Test ;
1312import org .junit .rules .ExpectedException ;
2019import static org .junit .Assert .*;
2120import static org .mockito .Mockito .*;
2221
23- public class FeignFieldLevelEncryptionEncoderTest {
22+ public class OpenFeignFieldLevelEncryptionEncoderTest {
2423
2524 @ Rule
2625 public ExpectedException expectedException = ExpectedException .none ();
@@ -39,7 +38,7 @@ public void testEncode_ShouldEncryptRequestPayloadAndUpdateContentLengthHeader()
3938 when (request .body ()).thenReturn ("{\" foo\" :\" bar\" }" .getBytes ());
4039
4140 // WHEN
42- FeignFieldLevelEncryptionEncoder instanceUnderTest = new FeignFieldLevelEncryptionEncoder (config , delegate );
41+ OpenFeignFieldLevelEncryptionEncoder instanceUnderTest = new OpenFeignFieldLevelEncryptionEncoder (config , delegate );
4342 instanceUnderTest .encode (object , type , request );
4443
4544 // THEN
@@ -67,7 +66,7 @@ public void testEncode_ShouldDoNothing_WhenNoPayload() throws Exception {
6766 when (request .body ()).thenReturn (null );
6867
6968 // WHEN
70- FeignFieldLevelEncryptionEncoder instanceUnderTest = new FeignFieldLevelEncryptionEncoder (config , delegate );
69+ OpenFeignFieldLevelEncryptionEncoder instanceUnderTest = new OpenFeignFieldLevelEncryptionEncoder (config , delegate );
7170 instanceUnderTest .encode (object , type , request );
7271
7372 // THEN
@@ -89,7 +88,7 @@ public void testEncode_ShouldDoNothing_WhenEmptyPayload() throws Exception {
8988 when (request .body ()).thenReturn ("" .getBytes ());
9089
9190 // WHEN
92- FeignFieldLevelEncryptionEncoder instanceUnderTest = new FeignFieldLevelEncryptionEncoder (config , delegate );
91+ OpenFeignFieldLevelEncryptionEncoder instanceUnderTest = new OpenFeignFieldLevelEncryptionEncoder (config , delegate );
9392 instanceUnderTest .encode (object , type , request );
9493
9594 // THEN
@@ -117,7 +116,7 @@ public void testEncode_ShouldThrowEncodeException_WhenEncryptionFails() throws E
117116 expectedException .expectCause (isA (EncryptionException .class ));
118117
119118 // WHEN
120- FeignFieldLevelEncryptionEncoder instanceUnderTest = new FeignFieldLevelEncryptionEncoder (config , delegate );
119+ OpenFeignFieldLevelEncryptionEncoder instanceUnderTest = new OpenFeignFieldLevelEncryptionEncoder (config , delegate );
121120 instanceUnderTest .encode (object , type , request );
122121 }
123122
@@ -140,7 +139,7 @@ public void testEncode_ShouldEncryptRequestPayloadAndAddEncryptionHttpHeaders_Wh
140139 when (request .body ()).thenReturn ("{\" foo\" :\" bar\" }" .getBytes ());
141140
142141 // WHEN
143- FeignFieldLevelEncryptionEncoder instanceUnderTest = new FeignFieldLevelEncryptionEncoder (config , delegate );
142+ OpenFeignFieldLevelEncryptionEncoder instanceUnderTest = new OpenFeignFieldLevelEncryptionEncoder (config , delegate );
144143 instanceUnderTest .encode (object , type , request );
145144
146145 // THEN
0 commit comments