From 9f80a7dadaec43ce58f70ba6fbf76624a121ab1d Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sat, 25 Apr 2020 13:04:39 +0200 Subject: [PATCH] typo fixes --- README.md | 4 +-- .../jvault/connector/HTTPVaultConnector.java | 4 +-- .../jvault/connector/VaultConnector.java | 28 +++++++++---------- .../builder/HTTPVaultConnectorBuilder.java | 6 ++-- .../factory/HTTPVaultConnectorFactory.java | 4 +-- .../jvault/connector/internal/Error.java | 2 +- .../connector/internal/RequestHelper.java | 6 ++-- .../jvault/connector/model/AppRole.java | 14 +++++----- .../connector/model/AppRoleBuilder.java | 16 +++++------ .../jvault/connector/model/TokenRole.java | 4 +-- .../model/response/SecretVersionResponse.java | 2 +- .../model/response/embedded/AuthData.java | 2 +- .../HTTPVaultConnectorOfflineTest.java | 2 +- .../connector/HTTPVaultConnectorTest.java | 18 ++++++------ .../connector/model/TokenBuilderTest.java | 2 +- .../model/response/MetadataResponseTest.java | 8 +++--- .../response/SecretVersionResponseTest.java | 2 +- 17 files changed, 62 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 77cc066..62f8552 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ Java Vault Connector is a connector library for [Vault](https://www.vaultproject * AppRole (register and authenticate) * AppID (register and authenticate) [_deprecated_] * Tokens - * Creation and lookup of tokens - * TokenBuilder for speaking creation of complex configuraitons + * Creation and lookup of tokens and token roles + * TokenBuilder for speaking creation of complex configurations * Secrets * Read secrets * Write secrets diff --git a/src/main/java/de/stklcode/jvault/connector/HTTPVaultConnector.java b/src/main/java/de/stklcode/jvault/connector/HTTPVaultConnector.java index ea37094..dbe21b9 100644 --- a/src/main/java/de/stklcode/jvault/connector/HTTPVaultConnector.java +++ b/src/main/java/de/stklcode/jvault/connector/HTTPVaultConnector.java @@ -31,7 +31,7 @@ import java.util.Map; import java.util.stream.Collectors; /** - * Vault Connector implementatin using Vault's HTTP API. + * Vault Connector implementation using Vault's HTTP API. * * @author Stefan Kalscheuer * @since 0.1 @@ -605,7 +605,7 @@ public class HTTPVaultConnector implements VaultConnector { /** * Common method to bundle secret version operations. * - * @param mount Secret store mountpoint (without leading or trailing slash). + * @param mount Secret store mount point (without leading or trailing slash). * @param pathPart Path part to query. * @param key Secret key. * @param versions Versions to handle. diff --git a/src/main/java/de/stklcode/jvault/connector/VaultConnector.java b/src/main/java/de/stklcode/jvault/connector/VaultConnector.java index c3cfd5d..ce5a1f6 100644 --- a/src/main/java/de/stklcode/jvault/connector/VaultConnector.java +++ b/src/main/java/de/stklcode/jvault/connector/VaultConnector.java @@ -91,7 +91,7 @@ public interface VaultConnector extends AutoCloseable, Serializable { HealthResponse getHealth() throws VaultConnectorException; /** - * Get all availale authentication backends. + * Get all available authentication backends. * * @return List of backends * @throws VaultConnectorException on error @@ -232,7 +232,7 @@ public interface VaultConnector extends AutoCloseable, Serializable { /** * Delete AppRole role from Vault. * - * @param roleName The role anme + * @param roleName The role name * @return {@code true} on success * @throws VaultConnectorException on error */ @@ -430,7 +430,7 @@ public interface VaultConnector extends AutoCloseable, Serializable { * Path {@code /data/} is read here. * Only available for KV v2 secrets. * - * @param mount Secret store mountpoint (without leading or trailing slash). + * @param mount Secret store mount point (without leading or trailing slash). * @param key Secret identifier * @return Secret response * @throws VaultConnectorException on error @@ -462,7 +462,7 @@ public interface VaultConnector extends AutoCloseable, Serializable { * Path {@code /data/} is written here. * Only available for KV v2 secrets. * - * @param mount Secret store mountpoint (without leading or trailing slash). + * @param mount Secret store mount point (without leading or trailing slash). * @param key Secret identifier * @param data Secret content. Value must be be JSON serializable. * @return Metadata for the created/updated secret. @@ -479,7 +479,7 @@ public interface VaultConnector extends AutoCloseable, Serializable { * Path {@code /data/} is written here. * Only available for KV v2 secrets. * - * @param mount Secret store mountpoint (without leading or trailing slash). + * @param mount Secret store mount point (without leading or trailing slash). * @param key Secret identifier * @param data Secret content. Value must be be JSON serializable. * @param cas Use Check-And-Set operation, i.e. only allow writing if current version matches this value. @@ -511,10 +511,10 @@ public interface VaultConnector extends AutoCloseable, Serializable { * Path {@code /data/} is read here. * Only available for KV v2 secrets. * - * @param mount Secret store mountpoint (without leading or trailing slash). + * @param mount Secret store mount point (without leading or trailing slash). * @param key Secret identifier * @param version Version to read. If {@code null} or zero, the latest version will be returned. - * @return Secret responsef + * @return Secret response. * @throws VaultConnectorException on error * @since 0.8 */ @@ -556,7 +556,7 @@ public interface VaultConnector extends AutoCloseable, Serializable { * Path {@code /metadata/} is read here. * Only available for KV v2 secrets. * - * @param mount Secret store mountpoint (without leading or trailing slash). + * @param mount Secret store mount point (without leading or trailing slash). * @param key Secret identifier * @return Metadata response * @throws VaultConnectorException on error @@ -570,7 +570,7 @@ public interface VaultConnector extends AutoCloseable, Serializable { * Path {@code /metadata/} is written here. * Only available for KV v2 secrets. * - * @param mount Secret store mountpoint (without leading or trailing slash). + * @param mount Secret store mount point (without leading or trailing slash). * @param key Secret identifier * @param maxVersions Maximum number of versions (fallback to backend default if {@code null}) * @param casRequired Specify if Check-And-Set is required for this secret. @@ -710,7 +710,7 @@ public interface VaultConnector extends AutoCloseable, Serializable { *
* Only available for KV v2 stores. * - * @param mount Secret store mountpoint (without leading or trailing slash). + * @param mount Secret store mount point (without leading or trailing slash). * @param key Secret path. * @throws VaultConnectorException on error * @since 0.8 @@ -737,7 +737,7 @@ public interface VaultConnector extends AutoCloseable, Serializable { * Prefix {@code secret/} is automatically added to path. * Only available for KV v2 stores. * - * @param mount Secret store mountpoint (without leading or trailing slash). + * @param mount Secret store mount point (without leading or trailing slash). * @param key Secret path. * @throws VaultConnectorException on error * @since 0.8 @@ -763,7 +763,7 @@ public interface VaultConnector extends AutoCloseable, Serializable { *
* Only available for KV v2 stores. * - * @param mount Secret store mountpoint (without leading or trailing slash). + * @param mount Secret store mount point (without leading or trailing slash). * @param key Secret path. * @param versions Versions of the secret to delete. * @throws VaultConnectorException on error @@ -788,7 +788,7 @@ public interface VaultConnector extends AutoCloseable, Serializable { * Undelete (restore) secret versions from Vault. * Only available for KV v2 stores. * - * @param mount Secret store mountpoint (without leading or trailing slash). + * @param mount Secret store mount point (without leading or trailing slash). * @param key Secret path. * @param versions Versions of the secret to undelete. * @throws VaultConnectorException on error @@ -813,7 +813,7 @@ public interface VaultConnector extends AutoCloseable, Serializable { * Destroy secret versions from Vault. * Only available for KV v2 stores. * - * @param mount Secret store mountpoint (without leading or trailing slash). + * @param mount Secret store mount point (without leading or trailing slash). * @param key Secret path. * @param versions Versions of the secret to destroy. * @throws VaultConnectorException on error diff --git a/src/main/java/de/stklcode/jvault/connector/builder/HTTPVaultConnectorBuilder.java b/src/main/java/de/stklcode/jvault/connector/builder/HTTPVaultConnectorBuilder.java index 0174389..97e8597 100644 --- a/src/main/java/de/stklcode/jvault/connector/builder/HTTPVaultConnectorBuilder.java +++ b/src/main/java/de/stklcode/jvault/connector/builder/HTTPVaultConnectorBuilder.java @@ -33,7 +33,7 @@ import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; /** - * Vault Connector Factory implementation for HTTP Vault connectors. + * Vault Connector Builder implementation for HTTP Vault connectors. * * @author Stefan Kalscheuer * @since 0.8.0 @@ -162,7 +162,7 @@ public final class HTTPVaultConnectorBuilder implements VaultConnectorBuilder { } /** - * Add a trusted CA certifiate for HTTPS connections. + * Add a trusted CA certificate for HTTPS connections. * * @param cert path to certificate file * @return self @@ -179,7 +179,7 @@ public final class HTTPVaultConnectorBuilder implements VaultConnectorBuilder { } /** - * Add a trusted CA certifiate for HTTPS connections. + * Add a trusted CA certificate for HTTPS connections. * * @param cert path to certificate file * @return self diff --git a/src/main/java/de/stklcode/jvault/connector/factory/HTTPVaultConnectorFactory.java b/src/main/java/de/stklcode/jvault/connector/factory/HTTPVaultConnectorFactory.java index 8ae3d5b..4389916 100644 --- a/src/main/java/de/stklcode/jvault/connector/factory/HTTPVaultConnectorFactory.java +++ b/src/main/java/de/stklcode/jvault/connector/factory/HTTPVaultConnectorFactory.java @@ -107,7 +107,7 @@ public final class HTTPVaultConnectorFactory extends VaultConnectorFactory { } /** - * Add a trusted CA certifiate for HTTPS connections. + * Add a trusted CA certificate for HTTPS connections. * * @param cert path to certificate file * @return self @@ -120,7 +120,7 @@ public final class HTTPVaultConnectorFactory extends VaultConnectorFactory { } /** - * Add a trusted CA certifiate for HTTPS connections. + * Add a trusted CA certificate for HTTPS connections. * * @param cert path to certificate file * @return self diff --git a/src/main/java/de/stklcode/jvault/connector/internal/Error.java b/src/main/java/de/stklcode/jvault/connector/internal/Error.java index 15c0f94..f72ab65 100644 --- a/src/main/java/de/stklcode/jvault/connector/internal/Error.java +++ b/src/main/java/de/stklcode/jvault/connector/internal/Error.java @@ -28,7 +28,7 @@ final class Error { static final String UNEXPECTED_RESPONSE = "Received response where none was expected"; static final String URI_FORMAT = "Invalid URI format"; static final String RESPONSE_CODE = "Invalid response code"; - static final String INIT_SSL_CONTEXT = "Unable to intialize SSLContext"; + static final String INIT_SSL_CONTEXT = "Unable to initialize SSLContext"; /** * Constructor hidden, this class should not be instantiated. diff --git a/src/main/java/de/stklcode/jvault/connector/internal/RequestHelper.java b/src/main/java/de/stklcode/jvault/connector/internal/RequestHelper.java index 560355f..00b5f1b 100644 --- a/src/main/java/de/stklcode/jvault/connector/internal/RequestHelper.java +++ b/src/main/java/de/stklcode/jvault/connector/internal/RequestHelper.java @@ -340,7 +340,7 @@ public final class RequestHelper implements Serializable { /* Fail on different error code and/or no retries left */ handleError(response); - /* Throw exception withoud details, if response entity is empty. */ + /* Throw exception without details, if response entity is empty. */ throw new InvalidResponseException(Error.RESPONSE_CODE, response.getStatusLine().getStatusCode()); } @@ -362,7 +362,7 @@ public final class RequestHelper implements Serializable { * Create a custom socket factory from trusted CA certificate. * * @return The factory. - * @throws TlsException An error occured during initialization of the SSL context. + * @throws TlsException An error occurred during initialization of the SSL context. * @since 0.8.0 */ private SSLConnectionSocketFactory createSSLSocketFactory() throws TlsException { @@ -376,7 +376,7 @@ public final class RequestHelper implements Serializable { TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); tmf.init(keyStore); - // Create context usint this TrustManager. + // Create context using this TrustManager. SSLContext context = SSLContext.getInstance(tlsVersion); context.init(null, tmf.getTrustManagers(), new SecureRandom()); diff --git a/src/main/java/de/stklcode/jvault/connector/model/AppRole.java b/src/main/java/de/stklcode/jvault/connector/model/AppRole.java index d65c12b..db1b249 100644 --- a/src/main/java/de/stklcode/jvault/connector/model/AppRole.java +++ b/src/main/java/de/stklcode/jvault/connector/model/AppRole.java @@ -198,7 +198,7 @@ public final class AppRole { } /** - * @return list of bound CIDR subnets of assiciated tokens + * @return list of bound CIDR subnets of associated tokens * @since 0.9 */ public List getTokenBoundCidrs() { @@ -578,22 +578,22 @@ public final class AppRole { /** * Set number of uses for sectet IDs. * - * @param secredIdNumUses the number of uses + * @param secretIdNumUses the number of uses * @return self */ - public Builder withSecretIdNumUses(final Integer secredIdNumUses) { - this.secretIdNumUses = secredIdNumUses; + public Builder withSecretIdNumUses(final Integer secretIdNumUses) { + this.secretIdNumUses = secretIdNumUses; return this; } /** * Set default sectet ID TTL in seconds. * - * @param secredIdTtl the TTL + * @param secretIdTtl the TTL * @return self */ - public Builder withSecretIdTtl(final Integer secredIdTtl) { - this.secretIdTtl = secredIdTtl; + public Builder withSecretIdTtl(final Integer secretIdTtl) { + this.secretIdTtl = secretIdTtl; return this; } diff --git a/src/main/java/de/stklcode/jvault/connector/model/AppRoleBuilder.java b/src/main/java/de/stklcode/jvault/connector/model/AppRoleBuilder.java index 9fd0e3d..7267127 100644 --- a/src/main/java/de/stklcode/jvault/connector/model/AppRoleBuilder.java +++ b/src/main/java/de/stklcode/jvault/connector/model/AppRoleBuilder.java @@ -181,24 +181,24 @@ public final class AppRoleBuilder { } /** - * Set number of uses for sectet IDs. + * Set number of uses for secret IDs. * - * @param secredIdNumUses the number of uses + * @param secretIdNumUses the number of uses * @return self */ - public AppRoleBuilder withSecretIdNumUses(final Integer secredIdNumUses) { - this.secretIdNumUses = secredIdNumUses; + public AppRoleBuilder withSecretIdNumUses(final Integer secretIdNumUses) { + this.secretIdNumUses = secretIdNumUses; return this; } /** - * Set default sectet ID TTL in seconds. + * Set default secret ID TTL in seconds. * - * @param secredIdTtl the TTL + * @param secretIdTtl the TTL * @return self */ - public AppRoleBuilder withSecretIdTtl(final Integer secredIdTtl) { - this.secretIdTtl = secredIdTtl; + public AppRoleBuilder withSecretIdTtl(final Integer secretIdTtl) { + this.secretIdTtl = secretIdTtl; return this; } diff --git a/src/main/java/de/stklcode/jvault/connector/model/TokenRole.java b/src/main/java/de/stklcode/jvault/connector/model/TokenRole.java index 3526f49..d32d087 100644 --- a/src/main/java/de/stklcode/jvault/connector/model/TokenRole.java +++ b/src/main/java/de/stklcode/jvault/connector/model/TokenRole.java @@ -136,14 +136,14 @@ public final class TokenRole { } /** - * @return Is Roken Role orphan? + * @return Is Token Role orphan? */ public Boolean getOrphan() { return orphan; } /** - * @return Is Roken Role renewable? + * @return Is Token Role renewable? */ public Boolean getRenewable() { return renewable; diff --git a/src/main/java/de/stklcode/jvault/connector/model/response/SecretVersionResponse.java b/src/main/java/de/stklcode/jvault/connector/model/response/SecretVersionResponse.java index 2a6d0a0..2abd162 100644 --- a/src/main/java/de/stklcode/jvault/connector/model/response/SecretVersionResponse.java +++ b/src/main/java/de/stklcode/jvault/connector/model/response/SecretVersionResponse.java @@ -25,7 +25,7 @@ import java.io.IOException; import java.util.Map; /** - * Vault response for a single secret version metatada, i.e. after update (KV v2). + * Vault response for a single secret version metadata, i.e. after update (KV v2). * * @author Stefan Kalscheuer * @since 0.8 diff --git a/src/main/java/de/stklcode/jvault/connector/model/response/embedded/AuthData.java b/src/main/java/de/stklcode/jvault/connector/model/response/embedded/AuthData.java index 9243eca..d5ed06c 100644 --- a/src/main/java/de/stklcode/jvault/connector/model/response/embedded/AuthData.java +++ b/src/main/java/de/stklcode/jvault/connector/model/response/embedded/AuthData.java @@ -83,7 +83,7 @@ public final class AuthData { } /** - * @return List of policies associated with the ooken + * @return List of policies associated with the token * @since 0.9 */ public List getTokenPolicies() { diff --git a/src/test/java/de/stklcode/jvault/connector/HTTPVaultConnectorOfflineTest.java b/src/test/java/de/stklcode/jvault/connector/HTTPVaultConnectorOfflineTest.java index 5ba03fb..db06169 100644 --- a/src/test/java/de/stklcode/jvault/connector/HTTPVaultConnectorOfflineTest.java +++ b/src/test/java/de/stklcode/jvault/connector/HTTPVaultConnectorOfflineTest.java @@ -151,7 +151,7 @@ public class HTTPVaultConnectorOfflineTest { } /** - * Test constductors of the {@link HTTPVaultConnector} class. + * Test constructors of the {@link HTTPVaultConnector} class. */ @Test public void constructorTest() throws IOException, CertificateException { diff --git a/src/test/java/de/stklcode/jvault/connector/HTTPVaultConnectorTest.java b/src/test/java/de/stklcode/jvault/connector/HTTPVaultConnectorTest.java index 08dbb99..c808f72 100644 --- a/src/test/java/de/stklcode/jvault/connector/HTTPVaultConnectorTest.java +++ b/src/test/java/de/stklcode/jvault/connector/HTTPVaultConnectorTest.java @@ -948,8 +948,8 @@ public class HTTPVaultConnectorTest { try { AppRoleResponse res = connector.lookupAppRole(roleName); // Note: As of Vault 0.8.3 default policy is not added automatically, so this test should return 1, not 2. - assertThat("Role lookuo returned wrong policy count (before Vault 0.8.3 is should be 2)", res.getRole().getPolicies(), hasSize(1)); - assertThat("Role lookuo returned wrong policies", res.getRole().getPolicies(), hasItem("testpolicy")); + assertThat("Role lookup returned wrong policy count (before Vault 0.8.3 is should be 2)", res.getRole().getPolicies(), hasSize(1)); + assertThat("Role lookup returned wrong policies", res.getRole().getPolicies(), hasItem("testpolicy")); } catch (VaultConnectorException e) { fail("Creation of role by name failed."); } @@ -1079,7 +1079,7 @@ public class HTTPVaultConnectorTest { assertThat("Root token should not be renewable", res.getAuth().isRenewable(), is(false)); assertThat("Root token should not be orphan", res.getAuth().isOrphan(), is(false)); - // Starting with Vault 1.0 a warning "cusotm ID uses weaker SHA1..." is given. + // Starting with Vault 1.0 a warning "custom ID uses weaker SHA1..." is given. if (VAULT_VERSION.startsWith("1.")) { assertThat("Token creation did not return expected warning.", res.getWarnings(), hasSize(1)); } else { @@ -1106,7 +1106,7 @@ public class HTTPVaultConnectorTest { assertThat("Metadata not correct.", res.getAuth().getMetadata().get("foo"), is("bar")); assertThat("Token should be renewable", res.getAuth().isRenewable(), is(true)); } catch (VaultConnectorException e) { - fail("Token createion failed: " + e.getMessage()); + fail("Token creation failed: " + e.getMessage()); } /* Overwrite token should fail as of Vault 0.8.0 */ @@ -1146,12 +1146,12 @@ public class HTTPVaultConnectorTest { assertThat("Specified token Type not set", res.getAuth().getTokenType(), is(Token.Type.BATCH.value())); } catch (VaultConnectorException e) { - fail("Token createion failed: " + e.getMessage()); + fail("Token creation failed: " + e.getMessage()); } } /** - * Test token lookuo. + * Test token lookup. */ @Test @Order(30) @@ -1268,8 +1268,8 @@ public class HTTPVaultConnectorTest { fail("Token role deletion failed."); } - assertThrows(InvalidResponseException.class, () -> connector.readTokenRole(roleName), "Reading inexistent token role should fail"); - assertThrows(InvalidResponseException.class, () -> connector.listTokenRoles(), "Listing inexistent token roles should fail"); + assertThrows(InvalidResponseException.class, () -> connector.readTokenRole(roleName), "Reading nonexistent token role should fail"); + assertThrows(InvalidResponseException.class, () -> connector.listTokenRoles(), "Listing nonexistent token roles should fail"); } } @@ -1405,7 +1405,7 @@ public class HTTPVaultConnectorTest { try { connector.seal(); assumeTrue(connector.sealStatus().isSealed()); - connector.resetAuth(); // SHould work unauthenticated + connector.resetAuth(); // Should work unauthenticated } catch (VaultConnectorException e) { fail("Unexpected exception on sealing: " + e.getMessage()); } diff --git a/src/test/java/de/stklcode/jvault/connector/model/TokenBuilderTest.java b/src/test/java/de/stklcode/jvault/connector/model/TokenBuilderTest.java index 3f228f6..3fa9513 100644 --- a/src/test/java/de/stklcode/jvault/connector/model/TokenBuilderTest.java +++ b/src/test/java/de/stklcode/jvault/connector/model/TokenBuilderTest.java @@ -86,7 +86,7 @@ public class TokenBuilderTest { * Build token without any parameters. */ @Test - public void legadcyBuildDefaultTest() throws JsonProcessingException { + public void legacyBuildDefaultTest() throws JsonProcessingException { Token token = new TokenBuilder().build(); assertThat(token.getId(), is(nullValue())); assertThat(token.getType(), is(nullValue())); diff --git a/src/test/java/de/stklcode/jvault/connector/model/response/MetadataResponseTest.java b/src/test/java/de/stklcode/jvault/connector/model/response/MetadataResponseTest.java index 0b2d65e..a37f675 100644 --- a/src/test/java/de/stklcode/jvault/connector/model/response/MetadataResponseTest.java +++ b/src/test/java/de/stklcode/jvault/connector/model/response/MetadataResponseTest.java @@ -77,7 +77,7 @@ public class MetadataResponseTest { try { MetadataResponse res = new ObjectMapper().readValue(META_JSON, MetadataResponse.class); assertThat("Parsed response is NULL", res, is(notNullValue())); - assertThat("Parsed metadatra is NULL", res.getMetadata(), is(notNullValue())); + assertThat("Parsed metadata is NULL", res.getMetadata(), is(notNullValue())); assertThat("Incorrect created time", res.getMetadata().getCreatedTimeString(), is(V1_TIME)); assertThat("Parting created time failed", res.getMetadata().getCreatedTime(), is(notNullValue())); assertThat("Incorrect current version", res.getMetadata().getCurrentVersion(), is(CURRENT_VERSION)); @@ -87,14 +87,14 @@ public class MetadataResponseTest { assertThat("Parting updated time failed", res.getMetadata().getUpdatedTime(), is(notNullValue())); assertThat("Incorrect number of versions", res.getMetadata().getVersions().size(), is(3)); assertThat("Incorrect version 1 delete time", res.getMetadata().getVersions().get(1).getDeletionTimeString(), is(V2_TIME)); - assertThat("Parsion version delete time failed", res.getMetadata().getVersions().get(1).getDeletionTime(), is(notNullValue())); + assertThat("Parsing version delete time failed", res.getMetadata().getVersions().get(1).getDeletionTime(), is(notNullValue())); assertThat("Incorrect version 1 destroyed state", res.getMetadata().getVersions().get(1).isDestroyed(), is(true)); assertThat("Incorrect version 2 created time", res.getMetadata().getVersions().get(2).getCreatedTimeString(), is(V2_TIME)); - assertThat("Parsion version created failed", res.getMetadata().getVersions().get(2).getCreatedTime(), is(notNullValue())); + assertThat("Parsing version created failed", res.getMetadata().getVersions().get(2).getCreatedTime(), is(notNullValue())); assertThat("Incorrect version 3 destroyed state", res.getMetadata().getVersions().get(3).isDestroyed(), is(false)); } catch (IOException e) { - fail("MetadataResoponse deserialization failed: " + e.getMessage()); + fail("MetadataResponse deserialization failed: " + e.getMessage()); } } } diff --git a/src/test/java/de/stklcode/jvault/connector/model/response/SecretVersionResponseTest.java b/src/test/java/de/stklcode/jvault/connector/model/response/SecretVersionResponseTest.java index 5422618..ca76d7d 100644 --- a/src/test/java/de/stklcode/jvault/connector/model/response/SecretVersionResponseTest.java +++ b/src/test/java/de/stklcode/jvault/connector/model/response/SecretVersionResponseTest.java @@ -54,7 +54,7 @@ public class SecretVersionResponseTest { try { SecretVersionResponse res = new ObjectMapper().readValue(META_JSON, SecretVersionResponse.class); assertThat("Parsed response is NULL", res, is(notNullValue())); - assertThat("Parsed metadatra is NULL", res.getMetadata(), is(notNullValue())); + assertThat("Parsed metadata is NULL", res.getMetadata(), is(notNullValue())); assertThat("Incorrect created time", res.getMetadata().getCreatedTimeString(), is(CREATION_TIME)); assertThat("Incorrect deletion time", res.getMetadata().getDeletionTimeString(), is(DELETION_TIME)); assertThat("Incorrect destroyed state", res.getMetadata().isDestroyed(), is(false));