From ab43a18bb0289558d9bc09d6ace34d247e5a746e Mon Sep 17 00:00:00 2001 From: "ICKostiantyn.Ivanov" Date: Wed, 31 Jan 2024 14:52:31 +0100 Subject: [PATCH] BAEL-6716 - Fix test methods naming --- .../baeldung/uuid/DecodeUUIDStringFromBase64UnitTest.java | 6 +++--- .../com/baeldung/uuid/EncodeUUIDToBase64StringUnitTest.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core-java-modules/core-java-uuid/src/test/java/com/baeldung/uuid/DecodeUUIDStringFromBase64UnitTest.java b/core-java-modules/core-java-uuid/src/test/java/com/baeldung/uuid/DecodeUUIDStringFromBase64UnitTest.java index 177f231b53..4ea496a723 100644 --- a/core-java-modules/core-java-uuid/src/test/java/com/baeldung/uuid/DecodeUUIDStringFromBase64UnitTest.java +++ b/core-java-modules/core-java-uuid/src/test/java/com/baeldung/uuid/DecodeUUIDStringFromBase64UnitTest.java @@ -14,7 +14,7 @@ public class DecodeUUIDStringFromBase64UnitTest { private final UUID originalUUID = UUID.fromString("cc5f93f7-8cf1-4a51-83c6-e740313a0c6c"); @Test - public void shouldDecodeUUIDUsingByteArrayAndBase64Decoder() { + public void givenEncodedString_whenDecodingUsingBase64Decoder_thenGiveExpectedUUID() { String expectedEncodedString = "UUrxjPeTX8xsDDoxQOfGgw"; byte[] decodedBytes = Base64.getDecoder() .decode(expectedEncodedString); @@ -23,7 +23,7 @@ public class DecodeUUIDStringFromBase64UnitTest { } @Test - public void shouldDecodeUUIDUsingByteBufferAndBase64UrlDecoder() { + public void givenEncodedString_whenDecodingUsingByteBufferAndBase64UrlDecoder_thenGiveExpectedUUID() { String expectedEncodedString = "zF-T94zxSlGDxudAMToMbA"; byte[] decodedBytes = Base64.getUrlDecoder() .decode(expectedEncodedString); @@ -35,7 +35,7 @@ public class DecodeUUIDStringFromBase64UnitTest { } @Test - public void shouldDecodeUUIDUsingApacheUtils() { + public void givenEncodedString_whenDecodingUsingApacheUtils_thenGiveExpectedUUID() { String expectedEncodedString = "UUrxjPeTX8xsDDoxQOfGgw"; byte[] decodedBytes = decodeBase64(expectedEncodedString); UUID uuid = Conversion.byteArrayToUuid(decodedBytes, 0); diff --git a/core-java-modules/core-java-uuid/src/test/java/com/baeldung/uuid/EncodeUUIDToBase64StringUnitTest.java b/core-java-modules/core-java-uuid/src/test/java/com/baeldung/uuid/EncodeUUIDToBase64StringUnitTest.java index a1ba921d4a..0748573548 100644 --- a/core-java-modules/core-java-uuid/src/test/java/com/baeldung/uuid/EncodeUUIDToBase64StringUnitTest.java +++ b/core-java-modules/core-java-uuid/src/test/java/com/baeldung/uuid/EncodeUUIDToBase64StringUnitTest.java @@ -14,7 +14,7 @@ public class EncodeUUIDToBase64StringUnitTest { private final UUID originalUUID = UUID.fromString("cc5f93f7-8cf1-4a51-83c6-e740313a0c6c"); @Test - public void shouldEncodeUUIDUsingByteArrayAndBase64Encoder() { + public void givenUUID_whenEncodingUsingBase64Encoder_thenGiveExpectedEncodedString() { String expectedEncodedString = "UUrxjPeTX8xsDDoxQOfGgw"; byte[] uuidBytes = convertToByteArray(originalUUID); String encodedUUID = Base64.getEncoder().withoutPadding() @@ -23,7 +23,7 @@ public class EncodeUUIDToBase64StringUnitTest { } @Test - public void shouldEncodeUUIDUsingByteBufferAndBase64UrlEncoder() { + public void givenUUID_whenEncodingUsingByteBufferAndBase64UrlEncoder_thenGiveExpectedEncodedString() { String expectedEncodedString = "zF-T94zxSlGDxudAMToMbA"; ByteBuffer byteBuffer = ByteBuffer.wrap(new byte[16]); byteBuffer.putLong(originalUUID.getMostSignificantBits()); @@ -34,7 +34,7 @@ public class EncodeUUIDToBase64StringUnitTest { } @Test - public void shouldEncodeUUIDUsingApacheUtils() { + public void givenUUID_whenEncodingUsingApacheUtils_thenGiveExpectedEncodedString() { String expectedEncodedString = "UUrxjPeTX8xsDDoxQOfGgw"; byte[] bytes = Conversion.uuidToByteArray(originalUUID, new byte[16], 0, 16); String encodedUUID = encodeBase64URLSafeString(bytes);