@Test(dependsOnMethods = "testCreateUsers")
public void testFindUserByName() {

    metadata.read(() -> {
        Optional<User> optional = provider.findUserBySystemName("user2");
        assertThat(optional.isPresent()).isTrue();
        User user2 = optional.get();
        assertThat(user2).extracting(User::getSystemName,
                                     User::getDisplayName,
                                     User::isEnabled).containsExactly("user2", "Mr. User Two", true);
    }, MetadataAccess.SERVICE);
    metadata.read(() -> {
        Optional<User> optional = provider.findUserBySystemName("bogus");
        assertThat(optional.isPresent()).isFalse();
    }, MetadataAccess.SERVICE);
}