@Test
public void testUpdateSnippet() throws Exception
{

    String snippetId = "test-snippet-id";
    
    Mockito.doReturn(
            "{'success': true, 'status': 'OK'}"
    ).when(sendwithusAPI).makeURLRequest(
            Mockito.endsWith("snippets/"+snippetId), Mockito.eq("PUT"), Mockito.anyMap()
    );
    
    String name = "test-snippet";
    String body = "<h1>test header</h1>";
    SnippetReceipt receipt = sendwithusAPI.updateSnippet(snippetId, name, body);
    assertSuccessfulAPIReceipt(receipt);
    assertTrue(receipt instanceof SnippetReceipt);
}