Skip to content

Commit f415b7f

Browse files
Renaming StaticKeyring to TestKeyring
1 parent 63057f5 commit f415b7f

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/test/java/com/amazonaws/encryptionsdk/AwsCryptoTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import java.util.Map;
4040
import java.util.concurrent.TimeUnit;
4141

42-
import com.amazonaws.encryptionsdk.internal.StaticKeyring;
42+
import com.amazonaws.encryptionsdk.internal.TestKeyring;
4343
import com.amazonaws.encryptionsdk.keyrings.Keyring;
4444
import org.junit.Before;
4545
import org.junit.Test;
@@ -65,7 +65,7 @@ public class AwsCryptoTest {
6565
@Before
6666
public void init() {
6767
masterKeyProvider = spy(new StaticMasterKey("testmaterial"));
68-
keyring = spy(new StaticKeyring("testmaterial"));
68+
keyring = spy(new TestKeyring("testmaterial"));
6969

7070
encryptionClient_ = new AwsCrypto();
7171
encryptionClient_.setEncryptionAlgorithm(CryptoAlgorithm.ALG_AES_128_GCM_IV12_TAG16_HKDF_SHA256);

src/test/java/com/amazonaws/encryptionsdk/DecryptRequestTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
package com.amazonaws.encryptionsdk;
1515

16-
import com.amazonaws.encryptionsdk.internal.StaticKeyring;
16+
import com.amazonaws.encryptionsdk.internal.TestKeyring;
1717
import com.amazonaws.encryptionsdk.keyrings.Keyring;
1818
import org.junit.jupiter.api.Test;
1919
import org.junit.jupiter.api.extension.ExtendWith;
@@ -52,7 +52,7 @@ void testNeitherCiphertextOrParsedCiphertext() {
5252
void testKeyringUsesDefaultCmm() {
5353

5454
byte[] ciphertext = new AwsCrypto().encrypt(EncryptRequest.builder()
55-
.keyring(new StaticKeyring("keyId"))
55+
.keyring(new TestKeyring("keyId"))
5656
.plaintext(new byte[]{4, 5, 6})
5757
.build()).getResult();
5858

src/test/java/com/amazonaws/encryptionsdk/DefaultCryptoMaterialsManagerTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import java.util.Objects;
2727
import java.util.function.Consumer;
2828

29-
import com.amazonaws.encryptionsdk.internal.StaticKeyring;
29+
import com.amazonaws.encryptionsdk.internal.TestKeyring;
3030
import com.amazonaws.encryptionsdk.keyrings.Keyring;
3131
import org.junit.Test;
3232

@@ -45,7 +45,7 @@
4545
public class DefaultCryptoMaterialsManagerTest {
4646
private static final MasterKey<?> mk1 = new StaticMasterKey("mk1");
4747
private static final MasterKey<?> mk2 = new StaticMasterKey("mk2");
48-
private static final Keyring keyring1 = new StaticKeyring("keyring1");
48+
private static final Keyring keyring1 = new TestKeyring("keyring1");
4949

5050
@Test
5151
public void encrypt_testBasicFunctionalityWithMkp() {

src/test/java/com/amazonaws/encryptionsdk/internal/DecryptionHandlerTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class DecryptionHandlerTest {
3939
@Before
4040
public void init() {
4141
masterKeyProvider_ = new StaticMasterKey("testmaterial");
42-
keyring = new StaticKeyring("testmaterial");
42+
keyring = new TestKeyring("testmaterial");
4343
}
4444

4545
@Test(expected = NullPointerException.class)

src/test/java/com/amazonaws/encryptionsdk/internal/StaticKeyring.java renamed to src/test/java/com/amazonaws/encryptionsdk/internal/TestKeyring.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import static java.util.Objects.requireNonNull;
4141

4242
/**
43-
* Static implementation of the {@link Keyring} interface that should only
43+
* Implementation of the {@link Keyring} interface that should only
4444
* used for unit-tests.
4545
* <p>
4646
* Contains a statically defined asymmetric key-pair that can be used
@@ -50,7 +50,7 @@
5050
* @author wesleyr
5151
*/
5252
@NotThreadSafe
53-
public class StaticKeyring implements Keyring {
53+
public class TestKeyring implements Keyring {
5454
private static final String PROVIDER_ID = "static_provider";
5555

5656
/**
@@ -89,7 +89,7 @@ public class StaticKeyring implements Keyring {
8989
* of the encrypted data, and is used to ensure that the header cannot
9090
* be tempered with.
9191
*/
92-
public StaticKeyring(@Nonnull final String keyId) {
92+
public TestKeyring(@Nonnull final String keyId) {
9393
this.keyId_ = requireNonNull(keyId);
9494

9595
try {

0 commit comments

Comments
 (0)