    @Test
    public void testListLinkedAccounts() throws Exception {

        Collection<LinkedAccount> designs = storage.listLinkedAccounts("user");
        Assert.assertNotNull(designs);
        Assert.assertEquals(0, designs.size());
        
        LinkedAccount account = new LinkedAccount();
        Date now = new Date();
        account.setType(LinkedAccountType.Bitbucket);
        account.setLinkedOn(now);

        storage.createLinkedAccount("user", account);
        account.setType(LinkedAccountType.GitHub);
        storage.createLinkedAccount("user", account);
        account.setType(LinkedAccountType.GitLab);
        storage.createLinkedAccount("user", account);
        
        account.setType(LinkedAccountType.GitHub);
        storage.createLinkedAccount("user2", account);
        account.setType(LinkedAccountType.GitLab);
        storage.createLinkedAccount("user2", account);

        designs = storage.listLinkedAccounts("user");
        Assert.assertNotNull(designs);
        Assert.assertEquals(3, designs.size());

        designs = storage.listLinkedAccounts("user2");
        Assert.assertNotNull(designs);
        Assert.assertEquals(2, designs.size());
    }