@Test
public void testGetSnippets() throws Exception
{

    Mockito.doReturn(
            "[{'id': 'test-snippet-id', 'name': 'test-snippet', 'body': '<h1>test header</h1>', 'created': 1414091325}]"
    ).when(sendwithusAPI).makeURLRequest(
            Mockito.endsWith("snippets"), Mockito.eq("GET")
    );
    
    Snippet[] snippets = sendwithusAPI.getSnippets();
    assertNotNull(snippets);
    assertTrue(snippets.length > 0);
    assertNotNull(snippets[0]);
    assertEquals("test-snippet", snippets[0].getName());
}