@Test
public void testEquals() {

    final TreeSet<String> capabilities = new TreeSet<>();
    capabilities.add(B2Capabilities.WRITE_FILES);
    capabilities.add(B2Capabilities.READ_FILES);
    final B2CreatedApplicationKey createdApplicationKey =
            new B2CreatedApplicationKey(
                    "accountId",
                    "appKeyId",
                    "appKey",
                    "keyName",
                    capabilities,
                    "bucketId",
                    "namePrefix",
                    12345678L,
                    B2TestHelpers.makeBucketOrApplicationKeyOptions()
            );
    final String createdApplicationKeyJson = B2Json.toJsonOrThrowRuntime(createdApplicationKey);
    final B2CreatedApplicationKey convertedCreatedApplicationKey =
            B2Json.fromJsonOrThrowRuntime(
                    createdApplicationKeyJson,
                    B2CreatedApplicationKey.class);
    assertEquals(createdApplicationKey, convertedCreatedApplicationKey);
}