nk1506 commented on code in PR #10086: URL: https://github.com/apache/iceberg/pull/10086#discussion_r1555225734
########## aws/src/integration/java/org/apache/iceberg/aws/dynamodb/TestDynamoDbCatalog.java: ########## @@ -99,22 +100,23 @@ public void testCreateNamespace() { .tableName(catalogTableName) .key(DynamoDbCatalog.namespacePrimaryKey(namespace)) .build()); - Assert.assertTrue("namespace must exist", response.hasItem()); - Assert.assertEquals( - "namespace must be stored in DynamoDB", - namespace.toString(), - response.item().get("namespace").s()); - Assertions.assertThatThrownBy(() -> catalog.createNamespace(namespace)) + assertThat(response.hasItem()).as("namespace must exist").isTrue(); + assertThat(response.item()) + .as("namespace must be stored in DynamoDB") + .hasEntrySatisfying( + "namespace", + attributeValue -> assertThat(attributeValue.s()).isEqualTo(namespace.toString())); Review Comment: for a single key match what about simple assertion like ``` assertThat(response.item().get("namespace").s()).as("namespace must be stored in DynamoDB").isEqualTo(namespace.toString()); ``` For multiple keys validation it looks good to use `hasEntrySatisfying`. WDYT ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org