### Question:
AzureAccess { protected void create(String partitionKey, String rowKey, Map<String, EntityProperty> properties) throws StorageException { table.execute(TableOperation.insert(new DynamicTableEntity(partitionKey, rowKey, new HashMap<>(properties)))); } AzureAccess(CloudTableClient client, String tableName);   }### Answer:
@Test public void testLogin() throws Exception { AzureLoginAccess instance = new AzureLoginAccess(tableClient); Login login = Login.create("userName", "userPid", new byte[]{'a'}, new byte[]{'a'}, "", "", "", ""); instance.addLogin(login); Optional<Login> retrievedLogin = instance.getLogin("userName"); assertThat(retrievedLogin, is(present())); assertThat(retrievedLogin.get(), is(login)); }
@Test public void testUser() throws Exception { AzureUserAccess instance = new AzureUserAccess(tableClient); User user = User.create("displayName", "persistentId"); instance.addUser(user); Optional<User> userForPersistentId = instance.getUserForPid("persistentId"); Optional<User> userForTimLocalId = instance.getUserForTimLocalId(user.getId()); assertThat(userForPersistentId.get(), is(user)); assertThat(userForTimLocalId.get(), is(user)); assertThat(user.getId(), not(isEmptyOrNullString())); }
@Test public void testNullHandling() throws Exception { AzureUserAccess instance = new AzureUserAccess(tableClient); User user = User.create(null, null); instance.addUser(user); Optional<User> userForPersistentId = instance.getUserForPid(null); Optional<User> userForTimLocalId = instance.getUserForTimLocalId(user.getId()); assertThat(userForPersistentId.get(), is(user)); assertThat(userForTimLocalId.get(), is(user)); assertThat(user.getId(), not(isEmptyOrNullString())); }