Repository: namaggarwal/splitwise

Issue:
Write Tests
We need to write tests for each of the API.

Discussion:

Patch:
diff --git a/splitwise/__init__.py b/splitwise/__init__.py
index 88c36ee..776d957 100644
--- a/splitwise/__init__.py
+++ b/splitwise/__init__.py
@@ -311,7 +311,7 @@ class Splitwise(object):
         if "group" in content:
             group_detail = Group(content["group"])
             if "errors" in content["group"]:
-                if len(content['errors']) != 0:
+                if len(content["group"]['errors']) != 0:
                     errors = SplitwiseError(content["group"]["errors"])
 
         return group_detail, errors
diff --git a/splitwise/expense.py b/splitwise/expense.py
index 1d82d0c..063519c 100644
--- a/splitwise/expense.py
+++ b/splitwise/expense.py
@@ -59,6 +59,11 @@ class Expense(object):
             for user in data["users"]:
                 self.users.append(ExpenseUser(user))
 
+            if "transaction_id" in data:
+                self.transaction_id = data["transaction_id"]
+            else:
+                self.transaction_id = None
+
     def getId(self):
         return self.id
 
@@ -187,5 +192,8 @@ class Expense(object):
     def setSplitEqually(self, shouldSplit=True):
         self.split_equally = shouldSplit
 
+    def getTransactionId(self):
+        return self.transaction_id
+
     def __getattr__(self, item):
         return None
diff --git a/splitwise/group.py b/splitwise/group.py
index 439227f..e3f30b8 100644
--- a/splitwise/group.py
+++ b/splitwise/group.py
@@ -11,6 +11,7 @@ class Group(object):
             self.id = data["id"]
             self.name = data["name"]
             self.updated_at = data["updated_at"]
+            self.created_at = data["created_at"]
             self.simplify_by_default = data["simplify_by_default"]
 
             if "group_type" in data:
@@ -50,6 +51,9 @@ class Group(object):
     def getName(self):
         return self.name
 
+    def getCreatedAt(self):
+        return self.created_at
+
     def getUpdatedAt(self):
         return self.updated_at
 
@@ -68,6 +72,9 @@ class Group(object):
     def getType(self):
         return self.group_type
 
+    def getGroupType(self):
+        return self.group_type
+
     def getSimplifiedDebts(self):
         return self.simplified_debts
 
@@ -77,9 +84,15 @@ class Group(object):
     def setName(self, name):
         self.name = name
 
+    def setType(self, group_type):
+        self.group_type = group_type
+
     def setGroupType(self, group_type):
         self.group_type = group_type
 
+    def setWhiteBoard(self, whiteboard):
+        self.whiteboard = whiteboard
+
     def setCountryCode(self, country_code):
         self.country_code = country_code
 
@@ -95,14 +108,17 @@ class Group(object):
 class FriendGroup(object):
 
     def __init__(self, data=None):
+        if data:
+            self.id = data["group_id"]
+            self.balances = []
+            for balance in data["balance"]:
+                self.balances.append(Balance(balance))
 
-        self.id = data["group_id"]
-        self.balances = []
-        for balance in data["balance"]:
-            self.balances.append(Balance(balance))
+    def setId(self, id):
+        self.id = id
 
     def getId(self):
         return self.id
 
     def getBalances(self):
-        return self.balance
+        return self.balances


Test patch:
diff --git a/tests/test_createExpense.py b/tests/test_createExpense.py
new file mode 100644
index 0000000..5d0328e
--- /dev/null
+++ b/tests/test_createExpense.py
@@ -0,0 +1,227 @@
+from splitwise import Splitwise
+from splitwise.expense import Expense, ExpenseUser
+import unittest
+try:
+    from unittest.mock import patch
+except ImportError:  # Python 2
+    from mock import patch
+
+
+@patch('splitwise.Splitwise._Splitwise__makeRequest')
+class CreateExpenseTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.sObj = Splitwise('consumerkey', 'consumersecret')
+
+    def test_createExpense_split_equally_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"expenses":[{"id":1010906976,"group_id":19433671,"friendship_id":null,"expense_bundle_id":null,"description":"Testing","repeats":false,"repeat_interval":"never","email_reminder":false,"email_reminder_in_advance":-1,"next_repeat":null,"details":null,"comments_count":0,"payment":false,"creation_method":null,"transaction_method":"offline","transaction_confirmed":false,"transaction_id":null,"cost":"10.0","currency_code":"SGD","repayments":[{"from":643871,"to":79774,"amount":"5.0"}],"date":"2020-06-24T06:57:29Z","created_at":"2020-06-24T06:57:29Z","created_by":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"},"custom_picture":true},"updated_at":"2020-06-24T06:57:29Z","updated_by":null,"deleted_at":null,"deleted_by":null,"category":{"id":18,"name":"General"},"receipt":{"large":null,"original":null},"users":[{"user":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"}},"user_id":79774,"paid_share":"10.0","owed_share":"5.0","net_balance":"5.0"},{"user":{"id":643871,"first_name":"Shantanu","last_name":"Alshi","picture":{"medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png"}},"user_id":643871,"paid_share":"0.0","owed_share":"5.0","net_balance":"-5.0"}]}],"errors":{}}'.encode('utf-8')  # noqa: E501
+        expense = Expense()
+        expense.setCost('10')
+        expense.setDescription("Testing")
+        expense.setGroupId(19433671)
+        expense.setSplitEqually()
+        expenseRes, errors = self.sObj.createExpense(expense)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/create_expense", "POST",
+            {'cost': '10', 'description': 'Testing', 'group_id': 19433671, 'split_equally': True})
+        self.assertIsNone(errors)
+        self.assertEqual(expenseRes.getId(), 1010906976)
+        self.assertEqual(expenseRes.getGroupId(), 19433671)
+        self.assertEqual(expenseRes.getFriendshipId(), None)
+        self.assertEqual(expenseRes.getExpenseBundleId(), None)
+        self.assertEqual(expenseRes.getDescription(), "Testing")
+        self.assertEqual(expenseRes.getRepeatInterval(), "never")
+        self.assertEqual(expenseRes.getEmailReminderInAdvance(), -1)
+        self.assertEqual(expenseRes.getNextRepeat(), None)
+        self.assertEqual(expenseRes.getDetails(), None)
+        self.assertEqual(expenseRes.getCommentsCount(), 0)
+        self.assertEqual(expenseRes.getCreationMethod(), None)
+        self.assertEqual(expenseRes.getTransactionMethod(), "offline")
+        self.assertEqual(expenseRes.getTransactionId(), None)
+        self.assertEqual(expenseRes.getCost(), "10.0")
+        self.assertEqual(expenseRes.getCurrencyCode(), "SGD")
+        self.assertEqual(len(expenseRes.getRepayments()), 1)
+        self.assertEqual(expenseRes.getRepayments()[0].getFromUser(), 643871)
+        self.assertEqual(expenseRes.getRepayments()[0].getToUser(), 79774)
+        self.assertEqual(expenseRes.getRepayments()[0].getAmount(), "5.0")
+        self.assertEqual(expenseRes.getDate(), "2020-06-24T06:57:29Z")
+        self.assertEqual(expenseRes.getCreatedAt(), "2020-06-24T06:57:29Z")
+        self.assertEqual(expenseRes.getCreatedBy().getId(), 79774)
+        self.assertEqual(expenseRes.getCreatedBy().getFirstName(), "Naman")
+        self.assertEqual(expenseRes.getCreatedBy().getLastName(), "Aggarwal")
+        self.assertEqual(expenseRes.getCreatedBy().getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expenseRes.getUpdatedAt(), "2020-06-24T06:57:29Z")
+        self.assertEqual(expenseRes.getUpdatedBy(), None)
+        self.assertEqual(expenseRes.getDeletedAt(), None)
+        self.assertEqual(expenseRes.getDeletedBy(), None)
+        self.assertEqual(expenseRes.getCategory().getId(), 18)
+        self.assertEqual(expenseRes.getCategory().getName(), "General")
+        self.assertEqual(expenseRes.getReceipt().getLarge(), None)
+        self.assertEqual(expenseRes.getReceipt().getOriginal(), None)
+        self.assertEqual(len(expenseRes.getUsers()), 2)
+        self.assertEqual(expenseRes.getUsers()[0].getId(), 79774)
+        self.assertEqual(expenseRes.getUsers()[0].getFirstName(), "Naman")
+        self.assertEqual(expenseRes.getUsers()[0].getLastName(), "Aggarwal")
+        self.assertEqual(expenseRes.getUsers()[0].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expenseRes.getUsers()[0].getPaidShare(), "10.0")
+        self.assertEqual(expenseRes.getUsers()[0].getOwedShare(), "5.0")
+        self.assertEqual(expenseRes.getUsers()[0].getNetBalance(), "5.0")
+        self.assertEqual(expenseRes.getUsers()[1].getId(), 643871)
+        self.assertEqual(expenseRes.getUsers()[1].getFirstName(), "Shantanu")
+        self.assertEqual(expenseRes.getUsers()[1].getLastName(), "Alshi")
+        self.assertEqual(expenseRes.getUsers()[1].getPicture().getMedium(
+        ), "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png")
+        self.assertEqual(expenseRes.getUsers()[1].getPaidShare(), "0.0")
+        self.assertEqual(expenseRes.getUsers()[1].getOwedShare(), "5.0")
+        self.assertEqual(expenseRes.getUsers()[1].getNetBalance(), "-5.0")
+
+    def test_createExpense_split_manually_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"expenses":[{"id":1010934284,"group_id":null,"friendship_id":null,"expense_bundle_id":null,"description":"Testing","repeats":false,"repeat_interval":"never","email_reminder":false,"email_reminder_in_advance":-1,"next_repeat":null,"details":null,"comments_count":0,"payment":false,"creation_method":null,"transaction_method":"offline","transaction_confirmed":false,"transaction_id":null,"cost":"10.0","currency_code":"SGD","repayments":[{"from":281236,"to":79774,"amount":"8.0"}],"date":"2020-06-24T08:14:07Z","created_at":"2020-06-24T08:14:07Z","created_by":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"},"custom_picture":true},"updated_at":"2020-06-24T08:14:07Z","updated_by":null,"deleted_at":null,"deleted_by":null,"category":{"id":18,"name":"General"},"receipt":{"large":null,"original":null},"users":[{"user":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"}},"user_id":79774,"paid_share":"10.0","owed_share":"2.0","net_balance":"8.0"},{"user":{"id":281236,"first_name":"Siddharth","last_name":"Goel","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg"}},"user_id":281236,"paid_share":"0.0","owed_share":"8.0","net_balance":"-8.0"}]}],"errors":{}}'.encode('utf-8')  # noqa: E501
+        expense = Expense()
+        expense.setCost('10')
+        expense.setDescription("Testing")
+        user1 = ExpenseUser()
+        user1.setId(79774)
+        user1.setPaidShare('10.00')
+        user1.setOwedShare('2.0')
+        user2 = ExpenseUser()
+        user2.setId(281236)
+        user2.setPaidShare('0.00')
+        user2.setOwedShare('8.00')
+        users = []
+        users.append(user1)
+        users.append(user2)
+        expense.setUsers(users)
+        expenseRes, errors = self.sObj.createExpense(expense)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/create_expense", "POST",
+            {'cost': '10',
+             'description': 'Testing',
+             'users__0__user_id': 79774,
+             'users__0__paid_share': '10.00',
+             'users__0__owed_share': '2.0',
+             'users__1__user_id': 281236,
+             'users__1__paid_share': '0.00',
+             'users__1__owed_share': '8.00'
+             })
+        self.assertIsNone(errors)
+        self.assertEqual(expenseRes.getId(), 1010934284)
+        self.assertEqual(expenseRes.getGroupId(), None)
+        self.assertEqual(expenseRes.getFriendshipId(), None)
+        self.assertEqual(expenseRes.getExpenseBundleId(), None)
+        self.assertEqual(expenseRes.getDescription(), "Testing")
+        self.assertEqual(expenseRes.getRepeatInterval(), "never")
+        self.assertEqual(expenseRes.getEmailReminderInAdvance(), -1)
+        self.assertEqual(expenseRes.getNextRepeat(), None)
+        self.assertEqual(expenseRes.getDetails(), None)
+        self.assertEqual(expenseRes.getCommentsCount(), 0)
+        self.assertEqual(expenseRes.getCreationMethod(), None)
+        self.assertEqual(expenseRes.getTransactionMethod(), "offline")
+        self.assertEqual(expenseRes.getTransactionId(), None)
+        self.assertEqual(expenseRes.getCost(), "10.0")
+        self.assertEqual(expenseRes.getCurrencyCode(), "SGD")
+        self.assertEqual(len(expenseRes.getRepayments()), 1)
+        self.assertEqual(expenseRes.getRepayments()[0].getFromUser(), 281236)
+        self.assertEqual(expenseRes.getRepayments()[0].getToUser(), 79774)
+        self.assertEqual(expenseRes.getRepayments()[0].getAmount(), "8.0")
+        self.assertEqual(expenseRes.getDate(), "2020-06-24T08:14:07Z")
+        self.assertEqual(expenseRes.getCreatedAt(), "2020-06-24T08:14:07Z")
+        self.assertEqual(expenseRes.getCreatedBy().getId(), 79774)
+        self.assertEqual(expenseRes.getCreatedBy().getFirstName(), "Naman")
+        self.assertEqual(expenseRes.getCreatedBy().getLastName(), "Aggarwal")
+        self.assertEqual(expenseRes.getCreatedBy().getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expenseRes.getUpdatedAt(), "2020-06-24T08:14:07Z")
+        self.assertEqual(expenseRes.getUpdatedBy(), None)
+        self.assertEqual(expenseRes.getDeletedAt(), None)
+        self.assertEqual(expenseRes.getDeletedBy(), None)
+        self.assertEqual(expenseRes.getCategory().getId(), 18)
+        self.assertEqual(expenseRes.getCategory().getName(), "General")
+        self.assertEqual(expenseRes.getReceipt().getLarge(), None)
+        self.assertEqual(expenseRes.getReceipt().getOriginal(), None)
+        self.assertEqual(len(expenseRes.getUsers()), 2)
+        self.assertEqual(expenseRes.getUsers()[0].getId(), 79774)
+        self.assertEqual(expenseRes.getUsers()[0].getFirstName(), "Naman")
+        self.assertEqual(expenseRes.getUsers()[0].getLastName(), "Aggarwal")
+        self.assertEqual(expenseRes.getUsers()[0].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expenseRes.getUsers()[0].getPaidShare(), "10.0")
+        self.assertEqual(expenseRes.getUsers()[0].getOwedShare(), "2.0")
+        self.assertEqual(expenseRes.getUsers()[0].getNetBalance(), "8.0")
+        self.assertEqual(expenseRes.getUsers()[1].getId(), 281236)
+        self.assertEqual(expenseRes.getUsers()[1].getFirstName(), "Siddharth")
+        self.assertEqual(expenseRes.getUsers()[1].getLastName(), "Goel")
+        self.assertEqual(expenseRes.getUsers()[1].getPicture().getMedium(
+        ), "https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg")
+        self.assertEqual(expenseRes.getUsers()[1].getPaidShare(), "0.0")
+        self.assertEqual(expenseRes.getUsers()[1].getOwedShare(), "8.0")
+        self.assertEqual(expenseRes.getUsers()[1].getNetBalance(), "-8.0")
+
+    def test_createExpense_error(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"expenses":[],"errors":{"base":["An unknown error occurred. Please try again or contact support@splitwise.com if you experience repeated issues. Sorry for the trouble!"]}}'.encode('utf-8')  # noqa: E501
+        expense = Expense()
+        expense.setCost('10')
+        expense.setDescription("Testing")
+        user1 = ExpenseUser()
+        user1.setId(79774)
+        user1.setPaidShare('10.00')
+        user1.setOwedShare('2.0')
+        user2 = ExpenseUser()
+        user2.setId(281236)
+        user2.setPaidShare('0.00')
+        user2.setOwedShare('8.00')
+        users = []
+        users.append(user1)
+        users.append(user2)
+        expense.setUsers(users)
+        expenseRes, errors = self.sObj.createExpense(expense)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/create_expense", "POST",
+            {'cost': '10',
+             'description': 'Testing',
+             'users__0__user_id': 79774,
+             'users__0__paid_share': '10.00',
+             'users__0__owed_share': '2.0',
+             'users__1__user_id': 281236,
+             'users__1__paid_share': '0.00',
+             'users__1__owed_share': '8.00'
+             })
+        self.assertEqual(errors.getErrors(), {
+            'base': [
+                'An unknown error occurred. Please try again or contact support@splitwise.com if you experience repeated issues. \
+Sorry for the trouble!'
+            ]})
+
+    def test_createExpense_exception(self, mockMakeRequest):
+        mockMakeRequest.side_effect = Exception(
+            "Invalid response %s. Please check your consumer key and secret." % 404)
+        expense = Expense()
+        expense.setCost('10')
+        expense.setDescription("Testing")
+        user1 = ExpenseUser()
+        user1.setId(79774)
+        user1.setPaidShare('10.00')
+        user1.setOwedShare('2.0')
+        user2 = ExpenseUser()
+        user2.setId(281236)
+        user2.setPaidShare('0.00')
+        user2.setOwedShare('8.00')
+        users = []
+        users.append(user1)
+        users.append(user2)
+        expense.setUsers(users)
+        with self.assertRaises(Exception):
+            expenseRes, errors = self.sObj.createExpense(expense)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/create_expense", "POST",
+            {'cost': '10',
+             'description': 'Testing',
+             'users__0__user_id': 79774,
+             'users__0__paid_share': '10.00',
+             'users__0__owed_share': '2.0',
+             'users__1__user_id': 281236,
+             'users__1__paid_share': '0.00',
+             'users__1__owed_share': '8.00'
+             })
diff --git a/tests/test_createGroup.py b/tests/test_createGroup.py
new file mode 100644
index 0000000..f6c1025
--- /dev/null
+++ b/tests/test_createGroup.py
@@ -0,0 +1,112 @@
+from splitwise import Splitwise
+from splitwise.group import Group, FriendGroup
+import unittest
+try:
+    from unittest.mock import patch
+except ImportError:  # Python 2
+    from mock import patch
+
+
+@patch('splitwise.Splitwise._Splitwise__makeRequest')
+class CreateGroupTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.sObj = Splitwise('consumerkey', 'consumersecret')
+
+    def test_createGroup_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"group":{"id":19481273,"name":"TestName","created_at":"2020-06-24T05:02:06Z","updated_at":"2020-06-24T05:02:06Z","members":[{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"small":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/small_mypic.jpg","medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg","large":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/large_mypic.jpg"},"custom_picture":true,"email":"nam.aggarwal@yahoo.com","registration_status":"confirmed","balance":[]},{"id":784241,"first_name":"ruks","last_name":null,"picture":{"small":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-50px.png","medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-100px.png","large":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-200px.png"},"custom_picture":false,"email":"rukmanivaithy@gmail.com","registration_status":"confirmed","balance":[]}],"simplify_by_default":false,"original_debts":[],"simplified_debts":[],"whiteboard":null,"group_type":"apartment","invite_link":"https://www.splitwise.com/join/1EUrTyyCHj7+1pjy","avatar":{"original":null,"xxlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby9-house-1000px.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby9-house-500px.png","large":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby9-house-200px.png","medium":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby9-house-100px.png","small":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby9-house-50px.png"},"custom_avatar":false,"cover_photo":{"xxlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-ruby-1000px.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-ruby-500px.png"}}}'.encode('utf-8')  # noqa: E501
+        group = Group()
+        group.setName("TestName")
+        group.setWhiteBoard("test Whiteboard")
+        group.setType("apartment")
+        user = FriendGroup()
+        user.setId(784241)
+        group.addMember(user)
+        user2 = FriendGroup()
+        user2.setId(123)
+        group.addMember(user2)
+        groupRes, error = self.sObj.createGroup(group)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/create_group", "POST",
+            {
+                "users__0__user_id": 784241,
+                "users__1__user_id": 123,
+                "name": "TestName", "whiteboard":
+                "test Whiteboard",
+                "group_type": "apartment"
+            })
+        self.assertIsNone(error)
+        self.assertEqual(groupRes.getId(), 19481273)
+        self.assertEqual(groupRes.getName(), "TestName")
+        self.assertEqual(groupRes.getCreatedAt(), "2020-06-24T05:02:06Z")
+        self.assertEqual(groupRes.getUpdatedAt(), "2020-06-24T05:02:06Z")
+        self.assertEqual(len(groupRes.getMembers()), 2)
+        self.assertEqual(groupRes.getMembers()[0].getId(), 79774)
+        self.assertEqual(groupRes.getMembers()[0].getFirstName(), "Naman")
+        self.assertEqual(groupRes.getMembers()[0].getLastName(), "Aggarwal")
+        self.assertEqual(groupRes.getMembers()[0].getPicture().getSmall(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/small_mypic.jpg")
+        self.assertEqual(groupRes.getMembers()[0].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(groupRes.getMembers()[0].getPicture().getLarge(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/large_mypic.jpg")
+        self.assertEqual(groupRes.getMembers()[0].getEmail(), "nam.aggarwal@yahoo.com")
+        self.assertEqual(groupRes.getMembers()[0].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(groupRes.getMembers()[0].getBalances()), 0)
+        self.assertEqual(groupRes.getMembers()[1].getId(), 784241)
+        self.assertEqual(groupRes.getMembers()[1].getFirstName(), "ruks")
+        self.assertEqual(groupRes.getMembers()[1].getLastName(), None)
+        self.assertEqual(groupRes.getMembers()[1].getPicture().getSmall(),
+                         "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-50px.png")
+        self.assertEqual(groupRes.getMembers()[1].getPicture().getMedium(),
+                         "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-100px.png")
+        self.assertEqual(groupRes.getMembers()[1].getPicture().getLarge(),
+                         "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-200px.png")
+        self.assertEqual(groupRes.getMembers()[1].getEmail(), "rukmanivaithy@gmail.com")
+        self.assertEqual(groupRes.getMembers()[1].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(groupRes.getMembers()[1].getBalances()), 0)
+        self.assertEqual(len(groupRes.getOriginalDebts()), 0)
+        self.assertEqual(len(groupRes.getSimplifiedDebts()), 0)
+        self.assertEqual(groupRes.getWhiteBoard(), None)
+        self.assertEqual(groupRes.getType(), "apartment")
+        self.assertEqual(groupRes.getInviteLink(), "https://www.splitwise.com/join/1EUrTyyCHj7+1pjy")
+        # self.assertEqual(groupRes.getAvatar().getOriginal(), None)
+        # self.assertEqual(groupRes.getAvatar().getXxlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby9-house-1000px.png")
+        # self.assertEqual(groupRes.getAvatar().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby9-house-500px.png")
+        # self.assertEqual(groupRes.getAvatar().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby9-house-200px.png")
+        # self.assertEqual(groupRes.getAvatar().getMedium(),
+        # "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby9-house-100px.png")
+        # self.assertEqual(groupRes.getAvatar().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby9-house-50px.png")
+        # self.assertEqual(groupRes.getCoverPhoto().getXxlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-ruby-1000px.png")
+        # self.assertEqual(groupRes.getCoverPhoto().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-ruby-500px.png")
+
+    def test_createGroup_error(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"group":{"id":null,"name":null,"created_at":null,"updated_at":null,"members":[],"simplify_by_default":false,"original_debts":[],"simplified_debts":[],"whiteboard":null,"group_type":"apartment","invite_link":"https://www.splitwise.com/join/vmz4CdiY3LM+1pjy","errors":{"name":["can\'t be blank"]},"avatar":{"original":null,"xxlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-teal1-house-1000px.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-teal1-house-500px.png","large":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-teal1-house-200px.png","medium":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-teal1-house-100px.png","small":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-teal1-house-50px.png"},"custom_avatar":false,"cover_photo":{"xxlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-teal-1000px.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-teal-500px.png"}}}'.encode('utf-8')  # noqa: E501
+        group = Group()
+        user = FriendGroup()
+        user.setId(784241)
+        group.addMember(user)
+        groupRes, error = self.sObj.createGroup(group)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/create_group", "POST",
+            {"users__0__user_id": 784241})
+        self.assertEqual(error.getErrors(), {"name": ["can\'t be blank"]})
+
+    def test_createGroup_exception(self, mockMakeRequest):
+        mockMakeRequest.side_effect = Exception(
+            "Invalid response %s. Please check your consumer key and secret." % 404)
+        group = Group()
+        user = FriendGroup()
+        user.setId(784241)
+        group.addMember(user)
+        with self.assertRaises(Exception):
+            self.sObj.createGroup(group)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/create_group", "POST",
+            {"users__0__user_id": 784241})
diff --git a/tests/test_getCategories.py b/tests/test_getCategories.py
new file mode 100644
index 0000000..a952471
--- /dev/null
+++ b/tests/test_getCategories.py
@@ -0,0 +1,161 @@
+from splitwise import Splitwise
+import unittest
+try:
+    from unittest.mock import patch
+except ImportError:  # Python 2
+    from mock import patch
+
+
+@patch('splitwise.Splitwise._Splitwise__makeRequest')
+class GetCategoriesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.sObj = Splitwise('consumerkey', 'consumersecret')
+
+    def test_getCategories_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"categories":[{"id":19,"name":"Entertainment","icon":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square/entertainment/other.png","icon_types":{"slim":{"small":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/other.png","large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/other@2x.png"},"square":{"large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/other@2x.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/other@3x.png"}},"subcategories":[{"id":20,"name":"Games","icon":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square/entertainment/games.png","icon_types":{"slim":{"small":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/games.png","large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/games@2x.png"},"square":{"large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/games@2x.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/games@3x.png"}}},{"id":21,"name":"Movies","icon":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square/entertainment/movies.png","icon_types":{"slim":{"small":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/movies.png","large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/movies@2x.png"},"square":{"large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/movies@2x.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/movies@3x.png"}}},{"id":22,"name":"Music","icon":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square/entertainment/music.png","icon_types":{"slim":{"small":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/music.png","large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/music@2x.png"},"square":{"large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/music@2x.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/music@3x.png"}}},{"id":23,"name":"Other","icon":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square/entertainment/other.png","icon_types":{"slim":{"small":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/other.png","large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/other@2x.png"},"square":{"large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/other@2x.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/other@3x.png"}}},{"id":24,"name":"Sports","icon":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square/entertainment/sports.png","icon_types":{"slim":{"small":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/sports.png","large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/sports@2x.png"},"square":{"large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/sports@2x.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/sports@3x.png"}}}]},{"id":25,"name":"Food and drink","icon":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square/food-and-drink/other.png","icon_types":{"slim":{"small":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/other.png","large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/other@2x.png"},"square":{"large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/other@2x.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/other@3x.png"}},"subcategories":[{"id":13,"name":"Dining out","icon":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square/food-and-drink/dining-out.png","icon_types":{"slim":{"small":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/dining-out.png","large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/dining-out@2x.png"},"square":{"large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/dining-out@2x.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/dining-out@3x.png"}}},{"id":12,"name":"Groceries","icon":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square/food-and-drink/groceries.png","icon_types":{"slim":{"small":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/groceries.png","large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/groceries@2x.png"},"square":{"large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/groceries@2x.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/groceries@3x.png"}}},{"id":38,"name":"Liquor","icon":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square/food-and-drink/liquor.png","icon_types":{"slim":{"small":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/liquor.png","large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/liquor@2x.png"},"square":{"large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/liquor@2x.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/liquor@3x.png"}}},{"id":26,"name":"Other","icon":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square/food-and-drink/other.png","icon_types":{"slim":{"small":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/other.png","large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/other@2x.png"},"square":{"large":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/other@2x.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/other@3x.png"}}}]}]}'.encode('utf-8')  # noqa: E501
+        categories = self.sObj.getCategories()
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_categories")
+        self.assertEqual(len(categories), 2)
+        self.assertEqual(categories[0].getId(), 19)
+        self.assertEqual(categories[0].getName(), "Entertainment")
+        # self.assertEqual(categories[0].getIcon(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/entertainment/other.png")
+        # self.assertEqual(categories[0].getIconTypes().getSlim().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/other.png")
+        # self.assertEqual(categories[0].getIconTypes().getSlim().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/other@2x.png")
+        # self.assertEqual(categories[0].getIconTypes().getSquare().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/other@2x.png")
+        # self.assertEqual(categories[0].getIconTypes().getSquare().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/other@3x.png")
+        self.assertEqual(len(categories[0].getSubcategories()), 5)
+        self.assertEqual(categories[0].getSubcategories()[0].getId(), 20)
+        self.assertEqual(categories[0].getSubcategories()[0].getName(), "Games")
+        # self.assertEqual(categories[0].getSubcategories()[0].getIcon(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/entertainment/games.png")
+        # self.assertEqual(categories[0].getSubcategories()[0].getIconTypes().getSlim().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/games.png")
+        # self.assertEqual(categories[0].getSubcategories()[0].getIconTypes().getSlim().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/games@2x.png")
+        # self.assertEqual(categories[0].getSubcategories()[0].getIconTypes().getSquare().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/games@2x.png")
+        # self.assertEqual(categories[0].getSubcategories()[0].getIconTypes().getSquare().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/games@3x.png")
+        self.assertEqual(categories[0].getSubcategories()[1].getId(), 21)
+        self.assertEqual(categories[0].getSubcategories()[1].getName(), "Movies")
+        # self.assertEqual(categories[0].getSubcategories()[1].getIcon(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/entertainment/movies.png")
+        # self.assertEqual(categories[0].getSubcategories()[1].getIconTypes().getSlim().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/movies.png")
+        # self.assertEqual(categories[0].getSubcategories()[1].getIconTypes().getSlim().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/movies@2x.png")
+        # self.assertEqual(categories[0].getSubcategories()[1].getIconTypes().getSquare().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/movies@2x.png")
+        # self.assertEqual(categories[0].getSubcategories()[1].getIconTypes().getSquare().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/movies@3x.png")
+        self.assertEqual(categories[0].getSubcategories()[2].getId(), 22)
+        self.assertEqual(categories[0].getSubcategories()[2].getName(), "Music")
+        # self.assertEqual(categories[0].getSubcategories()[2].getIcon(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/entertainment/music.png")
+        # self.assertEqual(categories[0].getSubcategories()[2].getIconTypes().getSlim().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/music.png")
+        # self.assertEqual(categories[0].getSubcategories()[2].getIconTypes().getSlim().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/music@2x.png")
+        # self.assertEqual(categories[0].getSubcategories()[2].getIconTypes().getSquare().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/music@2x.png")
+        # self.assertEqual(categories[0].getSubcategories()[2].getIconTypes().getSquare().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/music@3x.png")
+        self.assertEqual(categories[0].getSubcategories()[3].getId(), 23)
+        self.assertEqual(categories[0].getSubcategories()[3].getName(), "Other")
+        # self.assertEqual(categories[0].getSubcategories()[3].getIcon(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/entertainment/other.png")
+        # self.assertEqual(categories[0].getSubcategories()[3].getIconTypes().getSlim().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/other.png")
+        # self.assertEqual(categories[0].getSubcategories()[3].getIconTypes().getSlim().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/other@2x.png")
+        # self.assertEqual(categories[0].getSubcategories()[3].getIconTypes().getSquare().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/other@2x.png")
+        # self.assertEqual(categories[0].getSubcategories()[3].getIconTypes().getSquare().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/other@3x.png")
+        self.assertEqual(categories[0].getSubcategories()[4].getId(), 24)
+        self.assertEqual(categories[0].getSubcategories()[4].getName(), "Sports")
+        # self.assertEqual(categories[0].getSubcategories()[4].getIcon(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/entertainment/sports.png")
+        # self.assertEqual(categories[0].getSubcategories()[4].getIconTypes().getSlim().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/sports.png")
+        # self.assertEqual(categories[0].getSubcategories()[4].getIconTypes().getSlim().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/entertainment/sports@2x.png")
+        # self.assertEqual(categories[0].getSubcategories()[4].getIconTypes().getSquare().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/sports@2x.png")
+        # self.assertEqual(categories[0].getSubcategories()[4].getIconTypes().getSquare().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/entertainment/sports@3x.png")
+        self.assertEqual(categories[1].getId(), 25)
+        self.assertEqual(categories[1].getName(), "Food and drink")
+        # self.assertEqual(categories[1].getIcon(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/food-and-drink/other.png")
+        # self.assertEqual(categories[1].getIconTypes().getSlim().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/other.png")
+        # self.assertEqual(categories[1].getIconTypes().getSlim().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/other@2x.png")
+        # self.assertEqual(categories[1].getIconTypes().getSquare().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/other@2x.png")
+        # self.assertEqual(categories[1].getIconTypes().getSquare().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/other@3x.png")
+        self.assertEqual(len(categories[1].getSubcategories()), 4)
+        self.assertEqual(categories[1].getSubcategories()[0].getId(), 13)
+        self.assertEqual(categories[1].getSubcategories()[0].getName(), "Dining out")
+        # self.assertEqual(categories[1].getSubcategories()[0].getIcon(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/food-and-drink/dining-out.png")
+        # self.assertEqual(categories[1].getSubcategories()[0].getIconTypes().getSlim().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/dining-out.png")
+        # self.assertEqual(categories[1].getSubcategories()[0].getIconTypes().getSlim().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/dining-out@2x.png")
+        # self.assertEqual(categories[1].getSubcategories()[0].getIconTypes().getSquare().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/dining-out@2x.png")
+        # self.assertEqual(categories[1].getSubcategories()[0].getIconTypes().getSquare().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/dining-out@3x.png")
+        self.assertEqual(categories[1].getSubcategories()[1].getId(), 12)
+        self.assertEqual(categories[1].getSubcategories()[1].getName(), "Groceries")
+        # self.assertEqual(categories[1].getSubcategories()[1].getIcon(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/food-and-drink/groceries.png")
+        # self.assertEqual(categories[1].getSubcategories()[1].getIconTypes().getSlim().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/groceries.png")
+        # self.assertEqual(categories[1].getSubcategories()[1].getIconTypes().getSlim().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/groceries@2x.png")
+        # self.assertEqual(categories[1].getSubcategories()[1].getIconTypes().getSquare().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/groceries@2x.png")
+        # self.assertEqual(categories[1].getSubcategories()[1].getIconTypes().getSquare().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/groceries@3x.png")
+        self.assertEqual(categories[1].getSubcategories()[2].getId(), 38)
+        self.assertEqual(categories[1].getSubcategories()[2].getName(), "Liquor")
+        # self.assertEqual(categories[1].getSubcategories()[2].getIcon(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/food-and-drink/liquor.png")
+        # self.assertEqual(categories[1].getSubcategories()[2].getIconTypes().getSlim().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/liquor.png")
+        # self.assertEqual(categories[1].getSubcategories()[2].getIconTypes().getSlim().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/liquor@2x.png")
+        # self.assertEqual(categories[1].getSubcategories()[2].getIconTypes().getSquare().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/liquor@2x.png")
+        # self.assertEqual(categories[1].getSubcategories()[2].getIconTypes().getSquare().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/liquor@3x.png")
+        self.assertEqual(categories[1].getSubcategories()[3].getId(), 26)
+        self.assertEqual(categories[1].getSubcategories()[3].getName(), "Other")
+        # self.assertEqual(categories[1].getSubcategories()[3].getIcon(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/food-and-drink/other.png")
+        # self.assertEqual(categories[1].getSubcategories()[3].getIconTypes().getSlim().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/other.png")
+        # self.assertEqual(categories[1].getSubcategories()[3].getIconTypes().getSlim().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/slim/food-and-drink/other@2x.png")
+        # self.assertEqual(categories[1].getSubcategories()[3].getIconTypes().getSquare().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/other@2x.png")
+        # self.assertEqual(categories[1].getSubcategories()[3].getIconTypes().getSquare().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/category/icon/square_v2/food-and-drink/other@3x.png")
+
+    def test_getCategories_exception(self, mockMakeRequest):
+        mockMakeRequest.side_effect = Exception(
+            "Invalid response %s. Please check your consumer key and secret." % 404)
+        with self.assertRaises(Exception):
+            self.sObj.getCategories()
+        mockMakeRequest.assert_called_with("https://secure.splitwise.com/api/v3.0/get_categories")
diff --git a/tests/test_getCurrencies.py b/tests/test_getCurrencies.py
new file mode 100644
index 0000000..0d21d03
--- /dev/null
+++ b/tests/test_getCurrencies.py
@@ -0,0 +1,34 @@
+from splitwise import Splitwise
+import unittest
+try:
+    from unittest.mock import patch
+except ImportError:  # Python 2
+    from mock import patch
+
+
+@patch('splitwise.Splitwise._Splitwise__makeRequest')
+class GetCurrenciesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.sObj = Splitwise('consumerkey', 'consumersecret')
+
+    def test_getCurrencies_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"currencies":[{"currency_code":"AED","unit":"DH"},{"currency_code":"AFN","unit":"Afs"},{"currency_code":"ALL","unit":"L"}]}'.encode('utf-8')  # noqa: E501
+        currencies = self.sObj.getCurrencies()
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_currencies")
+        self.assertEqual(len(currencies), 3)
+        self.assertEqual(currencies[0].getCode(), "AED")
+        self.assertEqual(currencies[0].getUnit(), "DH")
+        self.assertEqual(currencies[1].getCode(), "AFN")
+        self.assertEqual(currencies[1].getUnit(), "Afs")
+        self.assertEqual(currencies[2].getCode(), "ALL")
+        self.assertEqual(currencies[2].getUnit(), "L")
+
+    def test_getCurrencies_exception(self, mockMakeRequest):
+        mockMakeRequest.side_effect = Exception(
+            "Invalid response %s. Please check your consumer key and secret." % 404)
+        with self.assertRaises(Exception):
+            self.sObj.getCurrencies()
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_currencies")
diff --git a/tests/test_getCurrentUser.py b/tests/test_getCurrentUser.py
new file mode 100644
index 0000000..18d50ce
--- /dev/null
+++ b/tests/test_getCurrentUser.py
@@ -0,0 +1,38 @@
+from splitwise import Splitwise
+import unittest
+try:
+    from unittest.mock import patch
+except ImportError:  # Python 2
+    from mock import patch
+
+
+@patch('splitwise.Splitwise._Splitwise__makeRequest')
+class GetCurrentUserTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.sObj = Splitwise('consumerkey', 'consumersecret')
+
+    def test_getCurrentUser_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"user":{"id":12345,"first_name":"Naman","last_name":"Aggarwal","picture":{"small":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/12345/small_mypic.jpg","medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/12345/medium_mypic.jpg","large":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/12345/large_mypic.jpg"},"custom_picture":true,"email":"naman@naman.com","registration_status":"confirmed","force_refresh_at":"2017-03-18T11:41:36Z","locale":"en","country_code":"IN","date_format":"MM/DD/YYYY","default_currency":"SGD","default_group_id":null,"notifications_read":"2020-06-10T14:12:01Z","notifications_count":8,"notifications":{"added_as_friend":true,"added_to_group":true,"expense_added":false,"expense_updated":false,"bills":true,"payments":true,"monthly_summary":true,"announcements":true}}}'.encode('utf-8')  # noqa: E501
+        user = self.sObj.getCurrentUser()
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_current_user")
+        self.assertEqual(user.getId(), 12345)
+        self.assertEqual(user.getFirstName(), "Naman")
+        self.assertEqual(user.getLastName(), "Aggarwal")
+        self.assertEqual(user.getEmail(), "naman@naman.com")
+        self.assertEqual(user.getPicture().getSmall(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/12345/small_mypic.jpg")
+        self.assertEqual(user.getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/12345/medium_mypic.jpg")
+        self.assertEqual(user.getPicture().getLarge(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/12345/large_mypic.jpg")
+        self.assertEqual(user.getRegistrationStatus(), "confirmed")
+
+    def test_getCurrentUser_exception(self, mockMakeRequest):
+        mockMakeRequest.side_effect = Exception(
+            "Invalid response %s. Please check your consumer key and secret." % 404)
+        with self.assertRaises(Exception):
+            self.sObj.getCurrentUser()
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_current_user")
diff --git a/tests/test_getExpense.py b/tests/test_getExpense.py
new file mode 100644
index 0000000..47aefbf
--- /dev/null
+++ b/tests/test_getExpense.py
@@ -0,0 +1,275 @@
+from splitwise import Splitwise
+import unittest
+try:
+    from unittest.mock import patch
+except ImportError:  # Python 2
+    from mock import patch
+
+
+@patch('splitwise.Splitwise._Splitwise__makeRequest')
+class GetExpenseTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.sObj = Splitwise('consumerkey', 'consumersecret')
+
+    def test_getExpense_equally_distributed_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"expense":{"id":1010404721,"group_id":19433671,"friendship_id":null,"expense_bundle_id":null,"description":"test","repeats":false,"repeat_interval":"never","email_reminder":false,"email_reminder_in_advance":-1,"next_repeat":null,"details":null,"comments_count":0,"payment":false,"creation_method":"equal","transaction_method":"offline","transaction_confirmed":false,"transaction_id":null,"cost":"10.0","currency_code":"SGD","repayments":[{"from":643871,"to":79774,"amount":"5.0"}],"date":"2020-06-23T09:56:09Z","created_at":"2020-06-23T09:56:14Z","created_by":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"},"custom_picture":true},"updated_at":"2020-06-23T09:56:14Z","updated_by":null,"deleted_at":null,"deleted_by":null,"category":{"id":18,"name":"General"},"receipt":{"large":null,"original":null},"users":[{"user":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"}},"user_id":79774,"paid_share":"10.0","owed_share":"5.0","net_balance":"5.0"},{"user":{"id":643871,"first_name":"Shantanu","last_name":"Alshi","picture":{"medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png"}},"user_id":643871,"paid_share":"0.0","owed_share":"5.0","net_balance":"-5.0"}],"comments":[]}}'.encode('utf-8')  # noqa: E501
+        expense = self.sObj.getExpense(1010404721)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_expense/1010404721")
+        self.assertEqual(expense.getId(), 1010404721)
+        self.assertEqual(expense.getGroupId(), 19433671)
+        self.assertEqual(expense.getFriendshipId(), None)
+        self.assertEqual(expense.getExpenseBundleId(), None)
+        self.assertEqual(expense.getDescription(), "test")
+        self.assertEqual(expense.getRepeatInterval(), "never")
+        self.assertEqual(expense.getEmailReminderInAdvance(), -1)
+        self.assertEqual(expense.getNextRepeat(), None)
+        self.assertEqual(expense.getDetails(), None)
+        self.assertEqual(expense.getCommentsCount(), 0)
+        self.assertEqual(expense.getCreationMethod(), "equal")
+        self.assertEqual(expense.getTransactionMethod(), "offline")
+        # self.assertEqual(expense.getTransactionId(), None)
+        self.assertEqual(expense.getCost(), "10.0")
+        self.assertEqual(expense.getCurrencyCode(), "SGD")
+        self.assertEqual(len(expense.getRepayments()), 1)
+        self.assertEqual(expense.getRepayments()[0].getFromUser(), 643871)
+        self.assertEqual(expense.getRepayments()[0].getToUser(), 79774)
+        self.assertEqual(expense.getRepayments()[0].getAmount(), "5.0")
+        self.assertEqual(expense.getDate(), "2020-06-23T09:56:09Z")
+        self.assertEqual(expense.getCreatedAt(), "2020-06-23T09:56:14Z")
+        self.assertEqual(expense.getCreatedBy().getId(), 79774)
+        self.assertEqual(expense.getCreatedBy().getFirstName(), "Naman")
+        self.assertEqual(expense.getCreatedBy().getLastName(), "Aggarwal")
+        self.assertEqual(expense.getCreatedBy().getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expense.getUpdatedAt(), "2020-06-23T09:56:14Z")
+        self.assertEqual(expense.getUpdatedBy(), None)
+        self.assertEqual(expense.getDeletedAt(), None)
+        self.assertEqual(expense.getDeletedBy(), None)
+        self.assertEqual(expense.getCategory().getId(), 18)
+        self.assertEqual(expense.getCategory().getName(), "General")
+        self.assertEqual(expense.getReceipt().getLarge(), None)
+        self.assertEqual(expense.getReceipt().getOriginal(), None)
+        self.assertEqual(len(expense.getUsers()), 2)
+        self.assertEqual(expense.getUsers()[0].getId(), 79774)
+        self.assertEqual(expense.getUsers()[0].getFirstName(), "Naman")
+        self.assertEqual(expense.getUsers()[0].getLastName(), "Aggarwal")
+        self.assertEqual(expense.getUsers()[0].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expense.getUsers()[0].getPaidShare(), "10.0")
+        self.assertEqual(expense.getUsers()[0].getOwedShare(), "5.0")
+        self.assertEqual(expense.getUsers()[0].getNetBalance(), "5.0")
+        self.assertEqual(expense.getUsers()[1].getId(), 643871)
+        self.assertEqual(expense.getUsers()[1].getFirstName(), "Shantanu")
+        self.assertEqual(expense.getUsers()[1].getLastName(), "Alshi")
+        self.assertEqual(expense.getUsers()[1].getPicture().getMedium(
+        ), "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png")
+        self.assertEqual(expense.getUsers()[1].getPaidShare(), "0.0")
+        self.assertEqual(expense.getUsers()[1].getOwedShare(), "5.0")
+        self.assertEqual(expense.getUsers()[1].getNetBalance(), "-5.0")
+        # self.assertEqual(len(expense.getComments()), 0)
+
+    def test_getExpense_equally_except_one_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"expense":{"id":1010396012,"group_id":10843533,"friendship_id":null,"expense_bundle_id":null,"description":"anna shop groceries parantha execpt curd","repeats":false,"repeat_interval":"never","email_reminder":false,"email_reminder_in_advance":-1,"next_repeat":null,"details":null,"comments_count":0,"payment":false,"creation_method":"equal","transaction_method":"offline","transaction_confirmed":false,"transaction_id":null,"cost":"8.0","currency_code":"SGD","repayments":[{"from":281236,"to":79774,"amount":"2.67"},{"from":643871,"to":79774,"amount":"2.66"}],"date":"2020-06-23T09:33:07Z","created_at":"2020-06-23T09:33:38Z","created_by":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"},"custom_picture":true},"updated_at":"2020-06-23T09:33:38Z","updated_by":null,"deleted_at":null,"deleted_by":null,"category":{"id":12,"name":"Groceries"},"receipt":{"large":null,"original":null},"users":[{"user":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"}},"user_id":79774,"paid_share":"8.0","owed_share":"2.67","net_balance":"5.33"},{"user":{"id":281236,"first_name":"Siddharth","last_name":"Goel","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg"}},"user_id":281236,"paid_share":"0.0","owed_share":"2.67","net_balance":"-2.67"},{"user":{"id":643871,"first_name":"Shantanu","last_name":"Alshi","picture":{"medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png"}},"user_id":643871,"paid_share":"0.0","owed_share":"2.66","net_balance":"-2.66"}],"comments":[]}}'.encode('utf-8')  # noqa: E501
+        expense = self.sObj.getExpense(1010396012)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_expense/1010396012")
+        self.assertEqual(expense.getId(), 1010396012)
+        self.assertEqual(expense.getGroupId(), 10843533)
+        self.assertEqual(expense.getFriendshipId(), None)
+        self.assertEqual(expense.getExpenseBundleId(), None)
+        self.assertEqual(expense.getDescription(), "anna shop groceries parantha execpt curd")
+        self.assertEqual(expense.getRepeatInterval(), "never")
+        self.assertEqual(expense.getEmailReminderInAdvance(), -1)
+        self.assertEqual(expense.getNextRepeat(), None)
+        self.assertEqual(expense.getDetails(), None)
+        self.assertEqual(expense.getCommentsCount(), 0)
+        self.assertEqual(expense.getCreationMethod(), "equal")
+        self.assertEqual(expense.getTransactionMethod(), "offline")
+        # self.assertEqual(expense.getTransactionId(), None)
+        self.assertEqual(expense.getCost(), "8.0")
+        self.assertEqual(expense.getCurrencyCode(), "SGD")
+        self.assertEqual(len(expense.getRepayments()), 2)
+        self.assertEqual(expense.getRepayments()[0].getFromUser(), 281236)
+        self.assertEqual(expense.getRepayments()[0].getToUser(), 79774)
+        self.assertEqual(expense.getRepayments()[0].getAmount(), "2.67")
+        self.assertEqual(expense.getRepayments()[1].getFromUser(), 643871)
+        self.assertEqual(expense.getRepayments()[1].getToUser(), 79774)
+        self.assertEqual(expense.getRepayments()[1].getAmount(), "2.66")
+        self.assertEqual(expense.getDate(), "2020-06-23T09:33:07Z")
+        self.assertEqual(expense.getCreatedAt(), "2020-06-23T09:33:38Z")
+        self.assertEqual(expense.getCreatedBy().getId(), 79774)
+        self.assertEqual(expense.getCreatedBy().getFirstName(), "Naman")
+        self.assertEqual(expense.getCreatedBy().getLastName(), "Aggarwal")
+        self.assertEqual(expense.getCreatedBy().getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expense.getUpdatedAt(), "2020-06-23T09:33:38Z")
+        self.assertEqual(expense.getUpdatedBy(), None)
+        self.assertEqual(expense.getDeletedAt(), None)
+        self.assertEqual(expense.getDeletedBy(), None)
+        self.assertEqual(expense.getCategory().getId(), 12)
+        self.assertEqual(expense.getCategory().getName(), "Groceries")
+        self.assertEqual(expense.getReceipt().getLarge(), None)
+        self.assertEqual(expense.getReceipt().getOriginal(), None)
+        self.assertEqual(len(expense.getUsers()), 3)
+        self.assertEqual(expense.getUsers()[0].getId(), 79774)
+        self.assertEqual(expense.getUsers()[0].getFirstName(), "Naman")
+        self.assertEqual(expense.getUsers()[0].getLastName(), "Aggarwal")
+        self.assertEqual(expense.getUsers()[0].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expense.getUsers()[0].getPaidShare(), "8.0")
+        self.assertEqual(expense.getUsers()[0].getOwedShare(), "2.67")
+        self.assertEqual(expense.getUsers()[0].getNetBalance(), "5.33")
+        self.assertEqual(expense.getUsers()[1].getId(), 281236)
+        self.assertEqual(expense.getUsers()[1].getFirstName(), "Siddharth")
+        self.assertEqual(expense.getUsers()[1].getLastName(), "Goel")
+        self.assertEqual(expense.getUsers()[1].getPicture().getMedium(
+        ), "https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg")
+        self.assertEqual(expense.getUsers()[1].getPaidShare(), "0.0")
+        self.assertEqual(expense.getUsers()[1].getOwedShare(), "2.67")
+        self.assertEqual(expense.getUsers()[1].getNetBalance(), "-2.67")
+        self.assertEqual(expense.getUsers()[2].getId(), 643871)
+        self.assertEqual(expense.getUsers()[2].getFirstName(), "Shantanu")
+        self.assertEqual(expense.getUsers()[2].getLastName(), "Alshi")
+        self.assertEqual(expense.getUsers()[2].getPicture().getMedium(
+        ), "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png")
+        self.assertEqual(expense.getUsers()[2].getPaidShare(), "0.0")
+        self.assertEqual(expense.getUsers()[2].getOwedShare(), "2.66")
+        self.assertEqual(expense.getUsers()[2].getNetBalance(), "-2.66")
+
+    def test_getExpense_itemized_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"expense":{"id":1004919507,"group_id":10843533,"friendship_id":null,"expense_bundle_id":null,"description":"Anna shop","repeats":false,"repeat_interval":"never","email_reminder":false,"email_reminder_in_advance":-1,"next_repeat":null,"details":"Mango - 2.20 (Naman Aggarwal)\\nBread - 3.00 (Siddharth Goel)\\nVegetable \\u0026 misc - 5.80 (Naman Aggarwal, Shantanu Alshi, Siddharth Goel)\\nTax: Naman Aggarwal - 0.00, ruks - 0.00, Shantanu Alshi - 0.00, Siddharth Goel - 0.00\\nTip: Naman Aggarwal - 0.00, ruks - 0.00, Shantanu Alshi - 0.00, Siddharth Goel - 0.00\\n","comments_count":0,"payment":false,"creation_method":"itemized","transaction_method":"offline","transaction_confirmed":false,"transaction_id":null,"cost":"11.0","currency_code":"SGD","repayments":[{"from":79774,"to":281236,"amount":"4.14"},{"from":643871,"to":281236,"amount":"1.93"}],"date":"2020-06-14T06:53:49Z","created_at":"2020-06-14T06:54:37Z","created_by":{"id":281236,"first_name":"Siddharth","last_name":"Goel","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg"},"custom_picture":true},"updated_at":"2020-06-14T06:54:37Z","updated_by":null,"deleted_at":null,"deleted_by":null,"category":{"id":12,"name":"Groceries"},"receipt":{"large":null,"original":null},"users":[{"user":{"id":281236,"first_name":"Siddharth","last_name":"Goel","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg"}},"user_id":281236,"paid_share":"11.0","owed_share":"4.93","net_balance":"6.07"},{"user":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"}},"user_id":79774,"paid_share":"0.0","owed_share":"4.14","net_balance":"-4.14"},{"user":{"id":643871,"first_name":"Shantanu","last_name":"Alshi","picture":{"medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png"}},"user_id":643871,"paid_share":"0.0","owed_share":"1.93","net_balance":"-1.93"}],"comments":[]}}'.encode('utf-8')  # noqa: E501
+        expense = self.sObj.getExpense(1004919507)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_expense/1004919507")
+        self.assertEqual(expense.getId(), 1004919507)
+        self.assertEqual(expense.getGroupId(), 10843533)
+        self.assertEqual(expense.getFriendshipId(), None)
+        self.assertEqual(expense.getExpenseBundleId(), None)
+        self.assertEqual(expense.getDescription(), "Anna shop")
+        self.assertEqual(expense.getRepeatInterval(), "never")
+        self.assertEqual(expense.getEmailReminderInAdvance(), -1)
+        self.assertEqual(expense.getNextRepeat(), None)
+        # self.assertEqual(expense.getDetails(),
+        #                 "Mango - 2.20 (Naman Aggarwal)\nBread - 3.00 (Siddharth Goel)\nVegetable \u0026 misc - 5.80\
+        # (Naman Aggarwal, Shantanu Alshi, Siddharth Goel)\nTax: Naman Aggarwal - 0.00, ruks - 0.00, Shantanu Alshi - 0.00, \
+        # Siddharth Goel - 0.00\nTip: Naman Aggarwal - 0.00, ruks - 0.00, Shantanu Alshi - 0.00, Siddharth Goel - 0.00\n")
+        self.assertEqual(expense.getCommentsCount(), 0)
+        self.assertEqual(expense.getCreationMethod(), "itemized")
+        self.assertEqual(expense.getTransactionMethod(), "offline")
+        # self.assertEqual(expense.getTransactionId(), None)
+        self.assertEqual(expense.getCost(), "11.0")
+        self.assertEqual(expense.getCurrencyCode(), "SGD")
+        self.assertEqual(len(expense.getRepayments()), 2)
+        self.assertEqual(expense.getRepayments()[0].getFromUser(), 79774)
+        self.assertEqual(expense.getRepayments()[0].getToUser(), 281236)
+        self.assertEqual(expense.getRepayments()[0].getAmount(), "4.14")
+        self.assertEqual(expense.getRepayments()[1].getFromUser(), 643871)
+        self.assertEqual(expense.getRepayments()[1].getToUser(), 281236)
+        self.assertEqual(expense.getRepayments()[1].getAmount(), "1.93")
+        self.assertEqual(expense.getDate(), "2020-06-14T06:53:49Z")
+        self.assertEqual(expense.getCreatedAt(), "2020-06-14T06:54:37Z")
+        self.assertEqual(expense.getCreatedBy().getId(), 281236)
+        self.assertEqual(expense.getCreatedBy().getFirstName(), "Siddharth")
+        self.assertEqual(expense.getCreatedBy().getLastName(), "Goel")
+        self.assertEqual(expense.getCreatedBy().getPicture().getMedium(
+        ), "https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg")
+        self.assertEqual(expense.getUpdatedAt(), "2020-06-14T06:54:37Z")
+        self.assertEqual(expense.getUpdatedBy(), None)
+        self.assertEqual(expense.getDeletedAt(), None)
+        self.assertEqual(expense.getDeletedBy(), None)
+        self.assertEqual(expense.getCategory().getId(), 12)
+        self.assertEqual(expense.getCategory().getName(), "Groceries")
+        self.assertEqual(expense.getReceipt().getLarge(), None)
+        self.assertEqual(expense.getReceipt().getOriginal(), None)
+        self.assertEqual(len(expense.getUsers()), 3)
+        self.assertEqual(expense.getUsers()[0].getId(), 281236)
+        self.assertEqual(expense.getUsers()[0].getFirstName(), "Siddharth")
+        self.assertEqual(expense.getUsers()[0].getLastName(), "Goel")
+        self.assertEqual(expense.getUsers()[0].getPicture().getMedium(
+        ), "https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg")
+        self.assertEqual(expense.getUsers()[0].getPaidShare(), "11.0")
+        self.assertEqual(expense.getUsers()[0].getOwedShare(), "4.93")
+        self.assertEqual(expense.getUsers()[0].getNetBalance(), "6.07")
+        self.assertEqual(expense.getUsers()[1].getId(), 79774)
+        self.assertEqual(expense.getUsers()[1].getFirstName(), "Naman")
+        self.assertEqual(expense.getUsers()[1].getLastName(), "Aggarwal")
+        self.assertEqual(expense.getUsers()[1].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expense.getUsers()[1].getPaidShare(), "0.0")
+        self.assertEqual(expense.getUsers()[1].getOwedShare(), "4.14")
+        self.assertEqual(expense.getUsers()[1].getNetBalance(), "-4.14")
+        self.assertEqual(expense.getUsers()[2].getId(), 643871)
+        self.assertEqual(expense.getUsers()[2].getFirstName(), "Shantanu")
+        self.assertEqual(expense.getUsers()[2].getLastName(), "Alshi")
+        self.assertEqual(expense.getUsers()[2].getPicture().getMedium(
+        ), "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png")
+        self.assertEqual(expense.getUsers()[2].getPaidShare(), "0.0")
+        self.assertEqual(expense.getUsers()[2].getOwedShare(), "1.93")
+        self.assertEqual(expense.getUsers()[2].getNetBalance(), "-1.93")
+
+    def test_getExpense_non_group_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"expense":{"id":982430660,"group_id":null,"friendship_id":null,"expense_bundle_id":null,"description":"From flatmates","repeats":false,"repeat_interval":"never","email_reminder":false,"email_reminder_in_advance":-1,"next_repeat":null,"details":null,"comments_count":0,"payment":false,"creation_method":"equal","transaction_method":"offline","transaction_confirmed":false,"transaction_id":null,"cost":"2162.82","currency_code":"SGD","repayments":[{"from":784241,"to":79774,"amount":"2162.82"}],"date":"2020-05-06T05:48:14Z","created_at":"2020-05-06T05:48:30Z","created_by":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"},"custom_picture":true},"updated_at":"2020-05-06T05:48:30Z","updated_by":null,"deleted_at":null,"deleted_by":null,"category":{"id":18,"name":"General"},"receipt":{"large":null,"original":null},"users":[{"user":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"}},"user_id":79774,"paid_share":"2162.82","owed_share":"0.0","net_balance":"2162.82"},{"user":{"id":784241,"first_name":"ruks","last_name":null,"picture":{"medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-100px.png"}},"user_id":784241,"paid_share":"0.0","owed_share":"2162.82","net_balance":"-2162.82"}],"comments":[]}}'.encode('utf-8')  # noqa: E501
+        expense = self.sObj.getExpense(982430660)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_expense/982430660")
+        self.assertEqual(expense.getId(), 982430660)
+        self.assertEqual(expense.getGroupId(), None)
+        self.assertEqual(expense.getFriendshipId(), None)
+        self.assertEqual(expense.getExpenseBundleId(), None)
+        self.assertEqual(expense.getDescription(), "From flatmates")
+        self.assertEqual(expense.getRepeatInterval(), "never")
+        self.assertEqual(expense.getEmailReminderInAdvance(), -1)
+        self.assertEqual(expense.getNextRepeat(), None)
+        self.assertEqual(expense.getDetails(), None)
+        self.assertEqual(expense.getCommentsCount(), 0)
+        self.assertEqual(expense.getCreationMethod(), "equal")
+        self.assertEqual(expense.getTransactionMethod(), "offline")
+        # self.assertEqual(expense.getTransactionId(), None)
+        self.assertEqual(expense.getCost(), "2162.82")
+        self.assertEqual(expense.getCurrencyCode(), "SGD")
+        self.assertEqual(len(expense.getRepayments()), 1)
+        self.assertEqual(expense.getRepayments()[0].getFromUser(), 784241)
+        self.assertEqual(expense.getRepayments()[0].getToUser(), 79774)
+        self.assertEqual(expense.getRepayments()[0].getAmount(), "2162.82")
+        self.assertEqual(expense.getDate(), "2020-05-06T05:48:14Z")
+        self.assertEqual(expense.getCreatedAt(), "2020-05-06T05:48:30Z")
+        self.assertEqual(expense.getCreatedBy().getId(), 79774)
+        self.assertEqual(expense.getCreatedBy().getFirstName(), "Naman")
+        self.assertEqual(expense.getCreatedBy().getLastName(), "Aggarwal")
+        self.assertEqual(expense.getCreatedBy().getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expense.getUpdatedAt(), "2020-05-06T05:48:30Z")
+        self.assertEqual(expense.getUpdatedBy(), None)
+        self.assertEqual(expense.getDeletedAt(), None)
+        self.assertEqual(expense.getDeletedBy(), None)
+        self.assertEqual(expense.getCategory().getId(), 18)
+        self.assertEqual(expense.getCategory().getName(), "General")
+        self.assertEqual(expense.getReceipt().getLarge(), None)
+        self.assertEqual(expense.getReceipt().getOriginal(), None)
+        self.assertEqual(len(expense.getUsers()), 2)
+        self.assertEqual(expense.getUsers()[0].getId(), 79774)
+        self.assertEqual(expense.getUsers()[0].getFirstName(), "Naman")
+        self.assertEqual(expense.getUsers()[0].getLastName(), "Aggarwal")
+        self.assertEqual(expense.getUsers()[0].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expense.getUsers()[0].getPaidShare(), "2162.82")
+        self.assertEqual(expense.getUsers()[0].getOwedShare(), "0.0")
+        self.assertEqual(expense.getUsers()[0].getNetBalance(), "2162.82")
+        self.assertEqual(expense.getUsers()[1].getId(), 784241)
+        self.assertEqual(expense.getUsers()[1].getFirstName(), "ruks")
+        self.assertEqual(expense.getUsers()[1].getLastName(), None)
+        self.assertEqual(expense.getUsers()[1].getPicture().getMedium(
+        ), "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-100px.png")
+        self.assertEqual(expense.getUsers()[1].getPaidShare(), "0.0")
+        self.assertEqual(expense.getUsers()[1].getOwedShare(), "2162.82")
+        self.assertEqual(expense.getUsers()[1].getNetBalance(), "-2162.82")
+
+    def test_getExpense_exception(self, mockMakeRequest):
+        mockMakeRequest.side_effect = Exception(
+            "Invalid response %s. Please check your consumer key and secret." % 404)
+        with self.assertRaises(Exception):
+            self.sObj.getExpense(123)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_expense/123")
diff --git a/tests/test_getExpenses.py b/tests/test_getExpenses.py
new file mode 100644
index 0000000..8bb94c0
--- /dev/null
+++ b/tests/test_getExpenses.py
@@ -0,0 +1,177 @@
+from splitwise import Splitwise
+import unittest
+try:
+    from unittest.mock import patch
+    from urllib.parse import parse_qs
+    import urllib.parse as urlparse
+except ImportError:  # Python 2
+    from mock import patch
+    from urlparse import parse_qs
+    import urlparse
+
+
+@patch('splitwise.Splitwise._Splitwise__makeRequest')
+class GetExpensesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.sObj = Splitwise('consumerkey', 'consumersecret')
+
+    def test_getExpenses_limit_and_offset_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"expenses":[{"id":1010395720,"group_id":10843533,"friendship_id":null,"expense_bundle_id":null,"description":"Potato","repeats":false,"repeat_interval":"never","email_reminder":false,"email_reminder_in_advance":-1,"next_repeat":null,"details":null,"comments_count":0,"payment":false,"creation_method":"equal","transaction_method":"offline","transaction_confirmed":false,"transaction_id":null,"cost":"0.9","currency_code":"SGD","repayments":[{"from":281236,"to":79774,"amount":"0.3"},{"from":643871,"to":79774,"amount":"0.3"}],"date":"2020-06-23T09:32:56Z","created_at":"2020-06-23T09:33:05Z","created_by":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"},"custom_picture":true},"updated_at":"2020-06-23T09:33:05Z","updated_by":null,"deleted_at":null,"deleted_by":null,"category":{"id":12,"name":"Groceries"},"receipt":{"large":null,"original":null},"users":[{"user":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"}},"user_id":79774,"paid_share":"0.9","owed_share":"0.3","net_balance":"0.6"},{"user":{"id":281236,"first_name":"Siddharth","last_name":"Goel","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg"}},"user_id":281236,"paid_share":"0.0","owed_share":"0.3","net_balance":"-0.3"},{"user":{"id":643871,"first_name":"Shantanu","last_name":"Alshi","picture":{"medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png"}},"user_id":643871,"paid_share":"0.0","owed_share":"0.3","net_balance":"-0.3"}]},{"id":1009711631,"group_id":10843533,"friendship_id":null,"expense_bundle_id":null,"description":"Mexican Dinner","repeats":false,"repeat_interval":"never","email_reminder":true,"email_reminder_in_advance":null,"next_repeat":null,"details":"","comments_count":0,"payment":false,"creation_method":"split","transaction_method":"offline","transaction_confirmed":false,"transaction_id":null,"cost":"32.7","currency_code":"SGD","repayments":[{"from":281236,"to":79774,"amount":"10.9"},{"from":643871,"to":79774,"amount":"10.9"}],"date":"2020-06-22T07:17:32Z","created_at":"2020-06-22T07:17:54Z","created_by":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"},"custom_picture":true},"updated_at":"2020-06-22T07:17:54Z","updated_by":null,"deleted_at":null,"deleted_by":null,"category":{"id":13,"name":"Dining out"},"receipt":{"large":null,"original":null},"users":[{"user":{"id":281236,"first_name":"Siddharth","last_name":"Goel","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg"}},"user_id":281236,"paid_share":"0.0","owed_share":"10.9","net_balance":"-10.9"},{"user":{"id":643871,"first_name":"Shantanu","last_name":"Alshi","picture":{"medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png"}},"user_id":643871,"paid_share":"0.0","owed_share":"10.9","net_balance":"-10.9"},{"user":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"}},"user_id":79774,"paid_share":"32.7","owed_share":"10.9","net_balance":"21.8"}]}]}'.encode('utf-8')  # noqa: E501
+        expenses = self.sObj.getExpenses(2, 3)
+        args, kwargs = mockMakeRequest.call_args
+        parsed = urlparse.urlparse(args[0])
+        qs = parse_qs(parsed.query)
+        self.assertEqual(qs['offset'], ['2'])
+        self.assertEqual(qs['limit'], ['3'])
+        self.assertEqual(len(expenses), 2)
+        self.assertEqual(expenses[0].getId(), 1010395720)
+        self.assertEqual(expenses[0].getGroupId(), 10843533)
+        self.assertEqual(expenses[0].getFriendshipId(), None)
+        self.assertEqual(expenses[0].getExpenseBundleId(), None)
+        self.assertEqual(expenses[0].getDescription(), "Potato")
+        self.assertEqual(expenses[0].getRepeatInterval(), "never")
+        self.assertEqual(expenses[0].getEmailReminderInAdvance(), -1)
+        self.assertEqual(expenses[0].getNextRepeat(), None)
+        self.assertEqual(expenses[0].getDetails(), None)
+        self.assertEqual(expenses[0].getCommentsCount(), 0)
+        self.assertEqual(expenses[0].getCreationMethod(), "equal")
+        self.assertEqual(expenses[0].getTransactionMethod(), "offline")
+        # self.assertEqual(expenses[0].getTransactionId(), None)
+        self.assertEqual(expenses[0].getCost(), "0.9")
+        self.assertEqual(expenses[0].getCurrencyCode(), "SGD")
+        self.assertEqual(len(expenses[0].getRepayments()), 2)
+        self.assertEqual(expenses[0].getRepayments()[0].getFromUser(), 281236)
+        self.assertEqual(expenses[0].getRepayments()[0].getToUser(), 79774)
+        self.assertEqual(expenses[0].getRepayments()[0].getAmount(), "0.3")
+        self.assertEqual(expenses[0].getRepayments()[1].getFromUser(), 643871)
+        self.assertEqual(expenses[0].getRepayments()[1].getToUser(), 79774)
+        self.assertEqual(expenses[0].getRepayments()[1].getAmount(), "0.3")
+        self.assertEqual(expenses[0].getDate(), "2020-06-23T09:32:56Z")
+        self.assertEqual(expenses[0].getCreatedAt(), "2020-06-23T09:33:05Z")
+        self.assertEqual(expenses[0].getCreatedBy().getId(), 79774)
+        self.assertEqual(expenses[0].getCreatedBy().getFirstName(), "Naman")
+        self.assertEqual(expenses[0].getCreatedBy().getLastName(), "Aggarwal")
+        self.assertEqual(expenses[0].getCreatedBy().getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expenses[0].getUpdatedAt(), "2020-06-23T09:33:05Z")
+        self.assertEqual(expenses[0].getUpdatedBy(), None)
+        self.assertEqual(expenses[0].getDeletedAt(), None)
+        self.assertEqual(expenses[0].getDeletedBy(), None)
+        self.assertEqual(expenses[0].getCategory().getId(), 12)
+        self.assertEqual(expenses[0].getCategory().getName(), "Groceries")
+        self.assertEqual(expenses[0].getReceipt().getLarge(), None)
+        self.assertEqual(expenses[0].getReceipt().getOriginal(), None)
+        self.assertEqual(len(expenses[0].getUsers()), 3)
+        self.assertEqual(expenses[0].getUsers()[0].getId(), 79774)
+        self.assertEqual(expenses[0].getUsers()[0].getFirstName(), "Naman")
+        self.assertEqual(expenses[0].getUsers()[0].getLastName(), "Aggarwal")
+        self.assertEqual(expenses[0].getUsers()[0].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expenses[0].getUsers()[0].getPaidShare(), "0.9")
+        self.assertEqual(expenses[0].getUsers()[0].getOwedShare(), "0.3")
+        self.assertEqual(expenses[0].getUsers()[0].getNetBalance(), "0.6")
+        self.assertEqual(expenses[0].getUsers()[1].getId(), 281236)
+        self.assertEqual(expenses[0].getUsers()[1].getFirstName(), "Siddharth")
+        self.assertEqual(expenses[0].getUsers()[1].getLastName(), "Goel")
+        self.assertEqual(expenses[0].getUsers()[1].getPicture().getMedium(
+        ), "https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg")
+        self.assertEqual(expenses[0].getUsers()[1].getPaidShare(), "0.0")
+        self.assertEqual(expenses[0].getUsers()[1].getOwedShare(), "0.3")
+        self.assertEqual(expenses[0].getUsers()[1].getNetBalance(), "-0.3")
+        self.assertEqual(expenses[0].getUsers()[2].getId(), 643871)
+        self.assertEqual(expenses[0].getUsers()[2].getFirstName(), "Shantanu")
+        self.assertEqual(expenses[0].getUsers()[2].getLastName(), "Alshi")
+        self.assertEqual(expenses[0].getUsers()[2].getPicture().getMedium(),
+                         "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png")
+        self.assertEqual(expenses[0].getUsers()[2].getPaidShare(), "0.0")
+        self.assertEqual(expenses[0].getUsers()[2].getOwedShare(), "0.3")
+        self.assertEqual(expenses[0].getUsers()[2].getNetBalance(), "-0.3")
+        self.assertEqual(expenses[1].getId(), 1009711631)
+        self.assertEqual(expenses[1].getGroupId(), 10843533)
+        self.assertEqual(expenses[1].getFriendshipId(), None)
+        self.assertEqual(expenses[1].getExpenseBundleId(), None)
+        self.assertEqual(expenses[1].getDescription(), "Mexican Dinner")
+        self.assertEqual(expenses[1].getRepeatInterval(), "never")
+        self.assertEqual(expenses[1].getEmailReminderInAdvance(), None)
+        self.assertEqual(expenses[1].getNextRepeat(), None)
+        self.assertEqual(expenses[1].getDetails(), "")
+        self.assertEqual(expenses[1].getCommentsCount(), 0)
+        self.assertEqual(expenses[1].getCreationMethod(), "split")
+        self.assertEqual(expenses[1].getTransactionMethod(), "offline")
+        # self.assertEqual(expenses[1].getTransactionId(), None)
+        self.assertEqual(expenses[1].getCost(), "32.7")
+        self.assertEqual(expenses[1].getCurrencyCode(), "SGD")
+        self.assertEqual(len(expenses[1].getRepayments()), 2)
+        self.assertEqual(expenses[1].getRepayments()[0].getFromUser(), 281236)
+        self.assertEqual(expenses[1].getRepayments()[0].getToUser(), 79774)
+        self.assertEqual(expenses[1].getRepayments()[0].getAmount(), "10.9")
+        self.assertEqual(expenses[1].getRepayments()[1].getFromUser(), 643871)
+        self.assertEqual(expenses[1].getRepayments()[1].getToUser(), 79774)
+        self.assertEqual(expenses[1].getRepayments()[1].getAmount(), "10.9")
+        self.assertEqual(expenses[1].getDate(), "2020-06-22T07:17:32Z")
+        self.assertEqual(expenses[1].getCreatedAt(), "2020-06-22T07:17:54Z")
+        self.assertEqual(expenses[1].getCreatedBy().getId(), 79774)
+        self.assertEqual(expenses[1].getCreatedBy().getFirstName(), "Naman")
+        self.assertEqual(expenses[1].getCreatedBy().getLastName(), "Aggarwal")
+        self.assertEqual(expenses[1].getCreatedBy().getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expenses[1].getUpdatedAt(), "2020-06-22T07:17:54Z")
+        self.assertEqual(expenses[1].getUpdatedBy(), None)
+        self.assertEqual(expenses[1].getDeletedAt(), None)
+        self.assertEqual(expenses[1].getDeletedBy(), None)
+        self.assertEqual(expenses[1].getCategory().getId(), 13)
+        self.assertEqual(expenses[1].getCategory().getName(), "Dining out")
+        self.assertEqual(expenses[1].getReceipt().getLarge(), None)
+        self.assertEqual(expenses[1].getReceipt().getOriginal(), None)
+        self.assertEqual(len(expenses[1].getUsers()), 3)
+        self.assertEqual(expenses[1].getUsers()[0].getId(), 281236)
+        self.assertEqual(expenses[1].getUsers()[0].getFirstName(), "Siddharth")
+        self.assertEqual(expenses[1].getUsers()[0].getLastName(), "Goel")
+        self.assertEqual(expenses[1].getUsers()[0].getPicture().getMedium(
+        ), "https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg")
+        self.assertEqual(expenses[1].getUsers()[0].getPaidShare(), "0.0")
+        self.assertEqual(expenses[1].getUsers()[0].getOwedShare(), "10.9")
+        self.assertEqual(expenses[1].getUsers()[0].getNetBalance(), "-10.9")
+        self.assertEqual(expenses[1].getUsers()[1].getId(), 643871)
+        self.assertEqual(expenses[1].getUsers()[1].getFirstName(), "Shantanu")
+        self.assertEqual(expenses[1].getUsers()[1].getLastName(), "Alshi")
+        self.assertEqual(expenses[1].getUsers()[1].getPicture().getMedium(),
+                         "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png")
+        self.assertEqual(expenses[1].getUsers()[1].getPaidShare(), "0.0")
+        self.assertEqual(expenses[1].getUsers()[1].getOwedShare(), "10.9")
+        self.assertEqual(expenses[1].getUsers()[1].getNetBalance(), "-10.9")
+        self.assertEqual(expenses[1].getUsers()[2].getId(), 79774)
+        self.assertEqual(expenses[1].getUsers()[2].getFirstName(), "Naman")
+        self.assertEqual(expenses[1].getUsers()[2].getLastName(), "Aggarwal")
+        self.assertEqual(expenses[1].getUsers()[2].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(expenses[1].getUsers()[2].getPaidShare(), "32.7")
+        self.assertEqual(expenses[1].getUsers()[2].getOwedShare(), "10.9")
+        self.assertEqual(expenses[1].getUsers()[2].getNetBalance(), "21.8")
+
+    def test_getExpenses_all_options_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"expenses":[{"id":1010395720,"group_id":10843533,"friendship_id":null,"expense_bundle_id":null,"description":"Potato","repeats":false,"repeat_interval":"never","email_reminder":false,"email_reminder_in_advance":-1,"next_repeat":null,"details":null,"comments_count":0,"payment":false,"creation_method":"equal","transaction_method":"offline","transaction_confirmed":false,"transaction_id":null,"cost":"0.9","currency_code":"SGD","repayments":[{"from":281236,"to":79774,"amount":"0.3"},{"from":643871,"to":79774,"amount":"0.3"}],"date":"2020-06-23T09:32:56Z","created_at":"2020-06-23T09:33:05Z","created_by":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"},"custom_picture":true},"updated_at":"2020-06-23T09:33:05Z","updated_by":null,"deleted_at":null,"deleted_by":null,"category":{"id":12,"name":"Groceries"},"receipt":{"large":null,"original":null},"users":[{"user":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"}},"user_id":79774,"paid_share":"0.9","owed_share":"0.3","net_balance":"0.6"},{"user":{"id":281236,"first_name":"Siddharth","last_name":"Goel","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg"}},"user_id":281236,"paid_share":"0.0","owed_share":"0.3","net_balance":"-0.3"},{"user":{"id":643871,"first_name":"Shantanu","last_name":"Alshi","picture":{"medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png"}},"user_id":643871,"paid_share":"0.0","owed_share":"0.3","net_balance":"-0.3"}]},{"id":1009711631,"group_id":10843533,"friendship_id":null,"expense_bundle_id":null,"description":"Mexican Dinner","repeats":false,"repeat_interval":"never","email_reminder":true,"email_reminder_in_advance":null,"next_repeat":null,"details":"","comments_count":0,"payment":false,"creation_method":"split","transaction_method":"offline","transaction_confirmed":false,"transaction_id":null,"cost":"32.7","currency_code":"SGD","repayments":[{"from":281236,"to":79774,"amount":"10.9"},{"from":643871,"to":79774,"amount":"10.9"}],"date":"2020-06-22T07:17:32Z","created_at":"2020-06-22T07:17:54Z","created_by":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"},"custom_picture":true},"updated_at":"2020-06-22T07:17:54Z","updated_by":null,"deleted_at":null,"deleted_by":null,"category":{"id":13,"name":"Dining out"},"receipt":{"large":null,"original":null},"users":[{"user":{"id":281236,"first_name":"Siddharth","last_name":"Goel","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg"}},"user_id":281236,"paid_share":"0.0","owed_share":"10.9","net_balance":"-10.9"},{"user":{"id":643871,"first_name":"Shantanu","last_name":"Alshi","picture":{"medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png"}},"user_id":643871,"paid_share":"0.0","owed_share":"10.9","net_balance":"-10.9"},{"user":{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg"}},"user_id":79774,"paid_share":"32.7","owed_share":"10.9","net_balance":"21.8"}]}]}'.encode('utf-8')  # noqa: E501
+        self.sObj.getExpenses(2, 3, "123", "1234", "2020-12-12", "2020-12-19", "2020-12-13", "2020-12-18")
+        args, kwargs = mockMakeRequest.call_args
+        parsed = urlparse.urlparse(args[0])
+        qs = parse_qs(parsed.query)
+        self.assertEqual(qs['offset'], ['2'])
+        self.assertEqual(qs['limit'], ['3'])
+        self.assertEqual(qs['group_id'], ['123'])
+        self.assertEqual(qs['friendship_id'], ['1234'])
+        self.assertEqual(qs['dated_after'], ['2020-12-12'])
+        self.assertEqual(qs['dated_before'], ['2020-12-19'])
+        self.assertEqual(qs['updated_after'], ['2020-12-13'])
+        self.assertEqual(qs['updated_before'], ['2020-12-18'])
+
+    def test_getExpenses_exception(self, mockMakeRequest):
+        mockMakeRequest.side_effect = Exception(
+            "Invalid response %s. Please check your consumer key and secret." % 404)
+        with self.assertRaises(Exception):
+            self.sObj.getExpenses(2, 3)
+        args, kwargs = mockMakeRequest.call_args
+        parsed = urlparse.urlparse(args[0])
+        qs = parse_qs(parsed.query)
+        self.assertEqual(qs['offset'], ['2'])
+        self.assertEqual(qs['limit'], ['3'])
diff --git a/tests/test_getFriends.py b/tests/test_getFriends.py
new file mode 100644
index 0000000..f72246a
--- /dev/null
+++ b/tests/test_getFriends.py
@@ -0,0 +1,57 @@
+from splitwise import Splitwise
+import unittest
+try:
+    from unittest.mock import patch
+except ImportError:  # Python 2
+    from mock import patch
+
+
+@patch('splitwise.Splitwise._Splitwise__makeRequest')
+class GetFriendsTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.sObj = Splitwise('consumerkey', 'consumersecret')
+
+    def test_getFriends_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"friends":[{"id":79773,"first_name":"Tirthankar","last_name":null,"email":"trh@gmail.com","registration_status":"confirmed","picture":{"small":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79773/small_avatar.jpeg","medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79773/medium_avatar.jpeg","large":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79773/large_avatar.jpeg"},"balance":[],"groups":[{"group_id":3449541,"balance":[]},{"group_id":6195367,"balance":[]},{"group_id":0,"balance":[]}],"updated_at":"2020-01-12T15:55:09Z"},{"id":281236,"first_name":"Siddharth","last_name":"Goel","email":"sid@gmail.com","registration_status":"confirmed","picture":{"small":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/small_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg","medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg","large":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/large_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg"},"balance":[{"currency_code":"SGD","amount":"-20.13"}],"groups":[{"group_id":489361,"balance":[]},{"group_id":629385,"balance":[]},{"group_id":961648,"balance":[]},{"group_id":1282223,"balance":[]},{"group_id":1376285,"balance":[]},{"group_id":1427377,"balance":[]},{"group_id":1591839,"balance":[]},{"group_id":1911503,"balance":[]},{"group_id":2829420,"balance":[]},{"group_id":2831598,"balance":[]},{"group_id":3001684,"balance":[]},{"group_id":3137253,"balance":[]},{"group_id":4149325,"balance":[]},{"group_id":5938420,"balance":[]},{"group_id":7517182,"balance":[]},{"group_id":10843533,"balance":[{"currency_code":"SGD","amount":"-20.13"}]},{"group_id":12991099,"balance":[]},{"group_id":17090245,"balance":[]},{"group_id":0,"balance":[]}],"updated_at":"2020-06-22T07:17:54Z"}]}'.encode('utf-8')  # noqa: E501
+        friends = self.sObj.getFriends()
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_friends")
+        self.assertEqual(len(friends), 2)
+        self.assertEqual(friends[0].getId(), 79773)
+        self.assertEqual(friends[0].getFirstName(), "Tirthankar")
+        self.assertEqual(friends[0].getLastName(), None)
+        self.assertEqual(friends[0].getEmail(), "trh@gmail.com")
+        self.assertEqual(friends[0].getRegistrationStatus(), "confirmed")
+        self.assertEqual(friends[0].getPicture().getSmall(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79773/small_avatar.jpeg")
+        self.assertEqual(friends[0].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79773/medium_avatar.jpeg")
+        self.assertEqual(friends[0].getPicture().getLarge(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79773/large_avatar.jpeg")
+        self.assertEqual(friends[0].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(friends[0].getBalances()), 0)
+        self.assertEqual(len(friends[0].getGroups()), 3)
+        self.assertEqual(friends[0].getGroups()[0].getId(), 3449541)
+        self.assertEqual(len(friends[0].getGroups()[0].getBalances()), 0)
+        self.assertEqual(friends[1].getId(), 281236)
+        self.assertEqual(friends[1].getFirstName(), "Siddharth")
+        self.assertEqual(friends[1].getLastName(), "Goel")
+        self.assertEqual(friends[1].getEmail(), "sid@gmail.com")
+        self.assertEqual(friends[1].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(friends[1].getBalances()), 1)
+        self.assertEqual(friends[1].getBalances()[0].getAmount(), '-20.13')
+        self.assertEqual(friends[1].getBalances()[0].getCurrencyCode(), 'SGD')
+        self.assertEqual(len(friends[1].getGroups()), 19)
+        self.assertEqual(friends[1].getGroups()[15].getId(), 10843533)
+        self.assertEqual(len(friends[1].getGroups()[15].getBalances()), 1)
+        self.assertEqual(friends[1].getGroups()[15].getBalances()[0].getCurrencyCode(), 'SGD')
+        self.assertEqual(friends[1].getGroups()[15].getBalances()[0].getAmount(), '-20.13')
+
+    def test_getFriends_exception(self, mockMakeRequest):
+        mockMakeRequest.side_effect = Exception(
+            "Invalid response %s. Please check your consumer key and secret." % 404)
+        with self.assertRaises(Exception):
+            self.sObj.getFriends()
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_friends")
diff --git a/tests/test_getGroup.py b/tests/test_getGroup.py
new file mode 100644
index 0000000..d414c0a
--- /dev/null
+++ b/tests/test_getGroup.py
@@ -0,0 +1,142 @@
+from splitwise import Splitwise
+import unittest
+try:
+    from unittest.mock import patch
+except ImportError:  # Python 2
+    from mock import patch
+
+
+@patch('splitwise.Splitwise._Splitwise__makeRequest')
+class GetCategoriesTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.sObj = Splitwise('consumerkey', 'consumersecret')
+
+    def test_getGroup_default_group_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"group":{"id":0,"name":"Non-group expenses","created_at":"2012-08-21T16:11:14Z","updated_at":"2020-06-23T09:42:10Z","members":[{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"small":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/small_mypic.jpg","medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg","large":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/large_mypic.jpg"},"custom_picture":true,"email":"nam.aggarwal@yahoo.com","registration_status":"confirmed","balance":[{"amount":"115000.0","currency_code":"INR"},{"amount":"2162.82","currency_code":"SGD"}]}],"simplify_by_default":false,"original_debts":[{"to":79774,"from":18145926,"amount":"115000.0","currency_code":"INR"},{"to":79774,"from":784241,"amount":"2162.82","currency_code":"SGD"}],"simplified_debts":[{"to":79774,"from":18145926,"amount":"115000.0","currency_code":"INR"},{"to":79774,"from":784241,"amount":"2162.82","currency_code":"SGD"}],"avatar":{"original":null,"xxlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-1000px.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-500px.png","large":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-200px.png","medium":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-100px.png","small":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-50px.png"},"custom_avatar":false,"cover_photo":{"xxlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-nongroup-1000px.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-nongroup-500px.png"}}}'.encode('utf-8')  # noqa: E501
+        group = self.sObj.getGroup()
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_group/0")
+        self.assertEqual(group.getId(), 0)
+        self.assertEqual(group.getName(), "Non-group expenses")
+        self.assertEqual(group.getUpdatedAt(), "2020-06-23T09:42:10Z")
+        self.assertEqual(len(group.getMembers()), 1)
+        self.assertEqual(group.getMembers()[0].getId(), 79774)
+        self.assertEqual(group.getMembers()[0].getFirstName(), "Naman")
+        self.assertEqual(group.getMembers()[0].getLastName(), "Aggarwal")
+        self.assertEqual(group.getMembers()[0].getPicture().getSmall(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/small_mypic.jpg")
+        self.assertEqual(group.getMembers()[0].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(group.getMembers()[0].getPicture().getLarge(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/large_mypic.jpg")
+        self.assertEqual(group.getMembers()[0].getEmail(), "nam.aggarwal@yahoo.com")
+        self.assertEqual(group.getMembers()[0].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(group.getMembers()[0].getBalances()), 2)
+        self.assertEqual(group.getMembers()[0].getBalances()[0].getAmount(), "115000.0")
+        self.assertEqual(group.getMembers()[0].getBalances()[0].getCurrencyCode(), "INR")
+        self.assertEqual(group.getMembers()[0].getBalances()[1].getAmount(), "2162.82")
+        self.assertEqual(group.getMembers()[0].getBalances()[1].getCurrencyCode(), "SGD")
+        self.assertEqual(len(group.getOriginalDebts()), 2)
+        self.assertEqual(group.getOriginalDebts()[0].getToUser(), 79774)
+        self.assertEqual(group.getOriginalDebts()[0].getFromUser(), 18145926)
+        self.assertEqual(group.getOriginalDebts()[0].getAmount(), "115000.0")
+        self.assertEqual(group.getOriginalDebts()[0].getCurrencyCode(), "INR")
+        self.assertEqual(group.getOriginalDebts()[1].getToUser(), 79774)
+        self.assertEqual(group.getOriginalDebts()[1].getFromUser(), 784241)
+        self.assertEqual(group.getOriginalDebts()[1].getAmount(), "2162.82")
+        self.assertEqual(group.getOriginalDebts()[1].getCurrencyCode(), "SGD")
+        self.assertEqual(len(group.getSimplifiedDebts()), 2)
+        self.assertEqual(group.getSimplifiedDebts()[0].getToUser(), 79774)
+        self.assertEqual(group.getSimplifiedDebts()[0].getFromUser(), 18145926)
+        self.assertEqual(group.getSimplifiedDebts()[0].getAmount(), "115000.0")
+        self.assertEqual(group.getSimplifiedDebts()[0].getCurrencyCode(), "INR")
+        self.assertEqual(group.getSimplifiedDebts()[1].getToUser(), 79774)
+        self.assertEqual(group.getSimplifiedDebts()[1].getFromUser(), 784241)
+        self.assertEqual(group.getSimplifiedDebts()[1].getAmount(), "2162.82")
+        self.assertEqual(group.getSimplifiedDebts()[1].getCurrencyCode(), "SGD")
+        # self.assertEqual(group.getAvatar().getOriginal(), None)
+        # self.assertEqual(group.getAvatar().getXxlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-1000px.png")
+        # self.assertEqual(group.getAvatar().getXlarge(),
+        #  "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-500px.png")
+        # self.assertEqual(group.getAvatar().getLarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-200px.png")
+        # self.assertEqual(group.getAvatar().getMedium(),
+        #  "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-100px.png")
+        # self.assertEqual(group.getAvatar().getSmall(),
+        # "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-50px.png")
+        # self.assertEqual(group.getCoverPhoto().getXxlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-nongroup-1000px.png")
+        # self.assertEqual(group.getCoverPhoto().getXlarge(),
+        # "https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-nongroup-500px.png")
+
+    def test_getGroup_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"group":{"id":10843533,"name":"Flatmates Again","created_at":"2019-01-01T06:01:57Z","updated_at":"2020-06-23T09:33:38Z","members":[{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"small":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/small_mypic.jpg","medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg","large":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/large_mypic.jpg"},"custom_picture":true,"email":"nam.aggarwal@yahoo.com","registration_status":"confirmed","balance":[{"currency_code":"SGD","amount":"-14.2"}]},{"id":281236,"first_name":"Siddharth","last_name":"Goel","picture":{"small":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/small_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg","medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg","large":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/large_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg"},"custom_picture":true,"email":"siddharth98391@gmail.com","registration_status":"confirmed","balance":[{"currency_code":"SGD","amount":"975.05"}]},{"id":643871,"first_name":"Shantanu","last_name":"Alshi","picture":{"small":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-50px.png","medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png","large":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-200px.png"},"custom_picture":false,"email":"shantanuals@gmail.com","registration_status":"confirmed","balance":[{"currency_code":"SGD","amount":"-960.85"}]},{"id":784241,"first_name":"ruks","last_name":null,"picture":{"small":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-50px.png","medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-100px.png","large":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-200px.png"},"custom_picture":false,"email":"rukmanivaithy@gmail.com","registration_status":"confirmed","balance":[{"currency_code":"SGD","amount":"0.0"}]}],"simplify_by_default":true,"original_debts":[{"from":281236,"to":79774,"amount":"2307.23","currency_code":"SGD"},{"currency_code":"SGD","from":79774,"to":643871,"amount":"2311.77"},{"currency_code":"SGD","from":79774,"to":784241,"amount":"9.66"},{"from":643871,"to":281236,"amount":"2520.67","currency_code":"SGD"},{"from":784241,"to":281236,"amount":"761.61","currency_code":"SGD"},{"currency_code":"SGD","from":643871,"to":784241,"amount":"751.95"}],"simplified_debts":[{"from":79774,"to":281236,"amount":"14.2","currency_code":"SGD"},{"from":643871,"to":281236,"amount":"960.85","currency_code":"SGD"}],"whiteboard":null,"group_type":"apartment","invite_link":"https://www.splitwise.com/join/d7bsHriQF5A+1pjy","avatar":{"original":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg","xxlarge":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/xxlarge_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg","xlarge":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/xlarge_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg","large":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/large_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg","medium":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/medium_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg","small":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/small_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg"},"custom_avatar":true,"cover_photo":{"xxlarge":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/xxlarge_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg","xlarge":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/xlarge_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg"}}}'.encode('utf-8')  # noqa: E501
+        group = self.sObj.getGroup(10843533)
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_group/10843533")
+
+        self.assertEqual(group.getId(), 10843533)
+        self.assertEqual(group.getName(), "Flatmates Again")
+        # self.assertEqual(group.getCreatedAt(), "2019-01-01T06:01:57Z")
+        self.assertEqual(group.getUpdatedAt(), "2020-06-23T09:33:38Z")
+        self.assertEqual(len(group.getMembers()), 4)
+        self.assertEqual(group.getMembers()[0].getId(), 79774)
+        self.assertEqual(group.getMembers()[0].getFirstName(), "Naman")
+        self.assertEqual(group.getMembers()[0].getLastName(), "Aggarwal")
+        self.assertEqual(group.getMembers()[0].getPicture().getSmall(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/small_mypic.jpg")
+        self.assertEqual(group.getMembers()[0].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(group.getMembers()[0].getPicture().getLarge(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/large_mypic.jpg")
+        self.assertEqual(group.getMembers()[0].getEmail(), "nam.aggarwal@yahoo.com")
+        self.assertEqual(group.getMembers()[0].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(group.getMembers()[0].getBalances()), 1)
+        self.assertEqual(group.getMembers()[0].getBalances()[0].getCurrencyCode(), "SGD")
+        self.assertEqual(group.getMembers()[0].getBalances()[0].getAmount(), "-14.2")
+        self.assertEqual(group.getMembers()[1].getId(), 281236)
+        self.assertEqual(group.getMembers()[1].getFirstName(), "Siddharth")
+        self.assertEqual(group.getMembers()[1].getLastName(), "Goel")
+        self.assertEqual(group.getMembers()[1].getPicture().getSmall(
+        ), "https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/small_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg")
+        self.assertEqual(group.getMembers()[1].getPicture().getMedium(
+        ), "https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg")
+        self.assertEqual(group.getMembers()[1].getPicture().getLarge(
+        ), "https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/large_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg")
+        self.assertEqual(group.getMembers()[1].getEmail(), "siddharth98391@gmail.com")
+        self.assertEqual(group.getMembers()[1].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(group.getMembers()[1].getBalances()), 1)
+        self.assertEqual(group.getMembers()[1].getBalances()[0].getCurrencyCode(), "SGD")
+        self.assertEqual(group.getMembers()[1].getBalances()[0].getAmount(), "975.05")
+        self.assertEqual(group.getMembers()[2].getId(), 643871)
+        self.assertEqual(group.getMembers()[2].getFirstName(), "Shantanu")
+        self.assertEqual(group.getMembers()[2].getLastName(), "Alshi")
+        self.assertEqual(group.getMembers()[2].getPicture().getSmall(
+        ), "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-50px.png")
+        self.assertEqual(group.getMembers()[2].getPicture().getMedium(
+        ), "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png")
+        self.assertEqual(group.getMembers()[2].getPicture().getLarge(
+        ), "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-200px.png")
+        self.assertEqual(group.getMembers()[2].getEmail(), "shantanuals@gmail.com")
+        self.assertEqual(group.getMembers()[2].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(group.getMembers()[2].getBalances()), 1)
+        self.assertEqual(group.getMembers()[2].getBalances()[0].getCurrencyCode(), "SGD")
+        self.assertEqual(group.getMembers()[2].getBalances()[0].getAmount(), "-960.85")
+        self.assertEqual(group.getMembers()[3].getId(), 784241)
+        self.assertEqual(group.getMembers()[3].getFirstName(), "ruks")
+        self.assertEqual(group.getMembers()[3].getLastName(), None)
+        self.assertEqual(group.getMembers()[3].getPicture().getSmall(
+        ), "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-50px.png")
+        self.assertEqual(group.getMembers()[3].getPicture().getMedium(
+        ), "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-100px.png")
+        self.assertEqual(group.getMembers()[3].getPicture().getLarge(
+        ), "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-200px.png")
+
+    def test_getGroup_exception(self, mockMakeRequest):
+        mockMakeRequest.side_effect = Exception(
+            "Invalid response %s. Please check your consumer key and secret." % 404)
+        with self.assertRaises(Exception):
+            self.sObj.getGroup(123)
+        mockMakeRequest.assert_called_with("https://secure.splitwise.com/api/v3.0/get_group/123")
diff --git a/tests/test_getGroups.py b/tests/test_getGroups.py
new file mode 100644
index 0000000..9d1dff0
--- /dev/null
+++ b/tests/test_getGroups.py
@@ -0,0 +1,202 @@
+from splitwise import Splitwise
+import unittest
+try:
+    from unittest.mock import patch
+except ImportError:  # Python 2
+    from mock import patch
+
+
+@patch('splitwise.Splitwise._Splitwise__makeRequest')
+class GetGroupsTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.sObj = Splitwise('consumerkey', 'consumersecret')
+
+    def test_getGroups_success(self, mockMakeRequest):
+        mockMakeRequest.return_value = '{"groups":[{"id":0,"name":"Non-group expenses","created_at":"2012-08-21T16:11:14Z","updated_at":"2020-06-22T16:27:14Z","members":[{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"small":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/small_mypic.jpg","medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg","large":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/large_mypic.jpg"},"custom_picture":true,"email":"naman@yahoo.com","registration_status":"confirmed","balance":[{"amount":"115000.0","currency_code":"INR"},{"amount":"2162.82","currency_code":"SGD"}]}],"simplify_by_default":false,"original_debts":[{"to":79774,"from":18145926,"amount":"115000.0","currency_code":"INR"},{"to":79774,"from":784241,"amount":"2162.82","currency_code":"SGD"}],"simplified_debts":[{"to":79774,"from":18145926,"amount":"115000.0","currency_code":"INR"},{"to":79774,"from":784241,"amount":"2162.82","currency_code":"SGD"}],"avatar":{"original":null,"xxlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-1000px.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-500px.png","large":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-200px.png","medium":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-100px.png","small":"https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-50px.png"},"custom_avatar":false,"cover_photo":{"xxlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-nongroup-1000px.png","xlarge":"https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-nongroup-500px.png"}},{"id":10843533,"name":"Flatmates Again","created_at":"2019-01-01T06:01:57Z","updated_at":"2020-06-22T07:17:54Z","members":[{"id":79774,"first_name":"Naman","last_name":"Aggarwal","picture":{"small":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/small_mypic.jpg","medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg","large":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/large_mypic.jpg"},"custom_picture":true,"email":"naman@yahoo.com","registration_status":"confirmed","balance":[{"currency_code":"SGD","amount":"-20.13"}]},{"id":281236,"first_name":"Siddharth","last_name":"Goel","picture":{"small":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/small_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg","medium":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg","large":"https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/large_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg"},"custom_picture":true,"email":"siddharth98391@gmail.com","registration_status":"confirmed","balance":[{"currency_code":"SGD","amount":"978.02"}]},{"id":643871,"first_name":"Shantanu","last_name":"Alshi","picture":{"small":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-50px.png","medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png","large":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-200px.png"},"custom_picture":false,"email":"shantanuals@gmail.com","registration_status":"confirmed","balance":[{"currency_code":"SGD","amount":"-957.89"}]},{"id":784241,"first_name":"ruks","last_name":null,"picture":{"small":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-50px.png","medium":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-100px.png","large":"https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-200px.png"},"custom_picture":false,"email":"rukmanivaithy@gmail.com","registration_status":"confirmed","balance":[{"currency_code":"SGD","amount":"0.0"}]}],"simplify_by_default":true,"original_debts":[{"from":281236,"to":79774,"amount":"2304.26","currency_code":"SGD"},{"currency_code":"SGD","from":79774,"to":643871,"amount":"2314.73"},{"currency_code":"SGD","from":79774,"to":784241,"amount":"9.66"},{"from":643871,"to":281236,"amount":"2520.67","currency_code":"SGD"},{"from":784241,"to":281236,"amount":"761.61","currency_code":"SGD"},{"currency_code":"SGD","from":643871,"to":784241,"amount":"751.95"}],"simplified_debts":[{"from":79774,"to":281236,"amount":"20.13","currency_code":"SGD"},{"from":643871,"to":281236,"amount":"957.89","currency_code":"SGD"}],"whiteboard":null,"group_type":"apartment","invite_link":"https://www.splitwise.com/join/d7bsHriQF5A+1pjy","avatar":{"original":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg","xxlarge":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/xxlarge_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg","xlarge":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/xlarge_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg","large":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/large_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg","medium":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/medium_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg","small":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/small_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg"},"custom_avatar":true,"cover_photo":{"xxlarge":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/xxlarge_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg","xlarge":"https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/xlarge_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg"}}]}'.encode('utf-8')  # noqa: E501
+        groups = self.sObj.getGroups()
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_groups")
+        self.assertEqual(len(groups), 2)
+        self.assertEqual(groups[0].getId(), 0)
+        self.assertEqual(groups[0].getName(), "Non-group expenses")
+        self.assertEqual(groups[0].getUpdatedAt(), "2020-06-22T16:27:14Z")
+        self.assertEqual(len(groups[0].getMembers()), 1)
+        self.assertEqual(groups[0].getMembers()[0].getId(), 79774)
+        self.assertEqual(groups[0].getMembers()[0].getFirstName(), "Naman")
+        self.assertEqual(groups[0].getMembers()[0].getLastName(), "Aggarwal")
+        self.assertEqual(groups[0].getMembers()[0].getPicture().getSmall(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/small_mypic.jpg")
+        self.assertEqual(groups[0].getMembers()[0].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(groups[0].getMembers()[0].getPicture().getLarge(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/large_mypic.jpg")
+        self.assertEqual(groups[0].getMembers()[0].getEmail(), "naman@yahoo.com")
+        self.assertEqual(groups[0].getMembers()[0].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(groups[0].getMembers()[0].getBalances()), 2)
+        self.assertEqual(groups[0].getMembers()[0].getBalances()[0].getAmount(), "115000.0")
+        self.assertEqual(groups[0].getMembers()[0].getBalances()[0].getCurrencyCode(), "INR")
+        self.assertEqual(groups[0].getMembers()[0].getBalances()[1].getAmount(), "2162.82")
+        self.assertEqual(groups[0].getMembers()[0].getBalances()[1].getCurrencyCode(), "SGD")
+        self.assertEqual(len(groups[0].getOriginalDebts()), 2)
+        self.assertEqual(groups[0].getOriginalDebts()[0].getToUser(), 79774)
+        self.assertEqual(groups[0].getOriginalDebts()[0].getFromUser(), 18145926)
+        self.assertEqual(groups[0].getOriginalDebts()[0].getAmount(), "115000.0")
+        self.assertEqual(groups[0].getOriginalDebts()[0].getCurrencyCode(), "INR")
+        self.assertEqual(groups[0].getOriginalDebts()[1].getToUser(), 79774)
+        self.assertEqual(groups[0].getOriginalDebts()[1].getFromUser(), 784241)
+        self.assertEqual(groups[0].getOriginalDebts()[1].getAmount(), "2162.82")
+        self.assertEqual(groups[0].getOriginalDebts()[1].getCurrencyCode(), "SGD")
+        self.assertEqual(len(groups[0].getSimplifiedDebts()), 2)
+        self.assertEqual(groups[0].getSimplifiedDebts()[0].getToUser(), 79774)
+        self.assertEqual(groups[0].getSimplifiedDebts()[0].getFromUser(), 18145926)
+        self.assertEqual(groups[0].getSimplifiedDebts()[0].getAmount(), "115000.0")
+        self.assertEqual(groups[0].getSimplifiedDebts()[0].getCurrencyCode(), "INR")
+        self.assertEqual(groups[0].getSimplifiedDebts()[1].getToUser(), 79774)
+        self.assertEqual(groups[0].getSimplifiedDebts()[1].getFromUser(), 784241)
+        self.assertEqual(groups[0].getSimplifiedDebts()[1].getAmount(), "2162.82")
+        self.assertEqual(groups[0].getSimplifiedDebts()[1].getCurrencyCode(), "SGD")
+        # self.assertEqual(groups[0].getAvatar().getOriginal(), None)
+        # self.assertEqual(groups[0].getAvatar().getXxlarge(),
+        #                   "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-1000px.png")
+        # self.assertEqual(groups[0].getAvatar().getXlarge(),
+        #                   "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-500px.png")
+        # self.assertEqual(groups[0].getAvatar().getLarge(),
+        #                   "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-200px.png")
+        # self.assertEqual(groups[0].getAvatar().getMedium(),
+        #                   "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-100px.png")
+        # self.assertEqual(groups[0].getAvatar().getSmall(),
+        #                   "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-nongroup-50px.png")
+        # self.assertEqual(groups[0].getCoverPhoto().getXxlarge(
+        # ), "https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-nongroup-1000px.png")
+        # self.assertEqual(groups[0].getCoverPhoto().getXlarge(
+        # ), "https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-nongroup-500px.png")
+        self.assertEqual(groups[1].getId(), 10843533)
+        self.assertEqual(groups[1].getName(), "Flatmates Again")
+        self.assertEqual(groups[1].getUpdatedAt(), "2020-06-22T07:17:54Z")
+        self.assertEqual(len(groups[1].getMembers()), 4)
+        self.assertEqual(groups[1].getMembers()[0].getId(), 79774)
+        self.assertEqual(groups[1].getMembers()[0].getFirstName(), "Naman")
+        self.assertEqual(groups[1].getMembers()[0].getLastName(), "Aggarwal")
+        self.assertEqual(groups[1].getMembers()[0].getPicture().getSmall(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/small_mypic.jpg")
+        self.assertEqual(groups[1].getMembers()[0].getPicture().getMedium(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/medium_mypic.jpg")
+        self.assertEqual(groups[1].getMembers()[0].getPicture().getLarge(),
+                         "https://splitwise.s3.amazonaws.com/uploads/user/avatar/79774/large_mypic.jpg")
+        self.assertEqual(groups[1].getMembers()[0].getEmail(), "naman@yahoo.com")
+        self.assertEqual(groups[1].getMembers()[0].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(groups[1].getMembers()[0].getBalances()), 1)
+        self.assertEqual(groups[1].getMembers()[0].getBalances()[0].getCurrencyCode(), "SGD")
+        self.assertEqual(groups[1].getMembers()[0].getBalances()[0].getAmount(), "-20.13")
+        self.assertEqual(groups[1].getMembers()[1].getId(), 281236)
+        self.assertEqual(groups[1].getMembers()[1].getFirstName(), "Siddharth")
+        self.assertEqual(groups[1].getMembers()[1].getLastName(), "Goel")
+        self.assertEqual(groups[1].getMembers()[1].getPicture().getSmall(
+        ), "https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/small_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg")
+        self.assertEqual(groups[1].getMembers()[1].getPicture().getMedium(
+        ), "https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/medium_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg")
+        self.assertEqual(groups[1].getMembers()[1].getPicture().getLarge(
+        ), "https://splitwise.s3.amazonaws.com/uploads/user/avatar/281236/large_f5fccc37-0a88-4519-9398-59c8c19b92aa.jpeg")
+        self.assertEqual(groups[1].getMembers()[1].getEmail(), "siddharth98391@gmail.com")
+        self.assertEqual(groups[1].getMembers()[1].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(groups[1].getMembers()[1].getBalances()), 1)
+        self.assertEqual(groups[1].getMembers()[1].getBalances()[0].getCurrencyCode(), "SGD")
+        self.assertEqual(groups[1].getMembers()[1].getBalances()[0].getAmount(), "978.02")
+        self.assertEqual(groups[1].getMembers()[2].getId(), 643871)
+        self.assertEqual(groups[1].getMembers()[2].getFirstName(), "Shantanu")
+        self.assertEqual(groups[1].getMembers()[2].getLastName(), "Alshi")
+        self.assertEqual(groups[1].getMembers()[2].getPicture().getSmall(),
+                         "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-50px.png")
+        self.assertEqual(groups[1].getMembers()[2].getPicture().getMedium(),
+                         "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-100px.png")
+        self.assertEqual(groups[1].getMembers()[2].getPicture().getLarge(),
+                         "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-blue19-200px.png")
+        self.assertEqual(groups[1].getMembers()[2].getEmail(), "shantanuals@gmail.com")
+        self.assertEqual(groups[1].getMembers()[2].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(groups[1].getMembers()[2].getBalances()), 1)
+        self.assertEqual(groups[1].getMembers()[2].getBalances()[0].getCurrencyCode(), "SGD")
+        self.assertEqual(groups[1].getMembers()[2].getBalances()[0].getAmount(), "-957.89")
+        self.assertEqual(groups[1].getMembers()[3].getId(), 784241)
+        self.assertEqual(groups[1].getMembers()[3].getFirstName(), "ruks")
+        self.assertEqual(groups[1].getMembers()[3].getLastName(), None)
+        self.assertEqual(groups[1].getMembers()[3].getPicture().getSmall(),
+                         "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-50px.png")
+        self.assertEqual(groups[1].getMembers()[3].getPicture().getMedium(),
+                         "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-100px.png")
+        self.assertEqual(groups[1].getMembers()[3].getPicture().getLarge(),
+                         "https://s3.amazonaws.com/splitwise/uploads/user/default_avatars/avatar-ruby47-200px.png")
+        self.assertEqual(groups[1].getMembers()[3].getEmail(), "rukmanivaithy@gmail.com")
+        self.assertEqual(groups[1].getMembers()[3].getRegistrationStatus(), "confirmed")
+        self.assertEqual(len(groups[1].getMembers()[3].getBalances()), 1)
+        self.assertEqual(groups[1].getMembers()[3].getBalances()[0].getCurrencyCode(), "SGD")
+        self.assertEqual(groups[1].getMembers()[3].getBalances()[0].getAmount(), "0.0")
+        self.assertEqual(len(groups[1].getOriginalDebts()), 6)
+        self.assertEqual(groups[1].getOriginalDebts()[0].getFromUser(), 281236)
+        self.assertEqual(groups[1].getOriginalDebts()[0].getToUser(), 79774)
+        self.assertEqual(groups[1].getOriginalDebts()[0].getAmount(), "2304.26")
+        self.assertEqual(groups[1].getOriginalDebts()[0].getCurrencyCode(), "SGD")
+        self.assertEqual(groups[1].getOriginalDebts()[1].getCurrencyCode(), "SGD")
+        self.assertEqual(groups[1].getOriginalDebts()[1].getFromUser(), 79774)
+        self.assertEqual(groups[1].getOriginalDebts()[1].getToUser(), 643871)
+        self.assertEqual(groups[1].getOriginalDebts()[1].getAmount(), "2314.73")
+        self.assertEqual(groups[1].getOriginalDebts()[2].getCurrencyCode(), "SGD")
+        self.assertEqual(groups[1].getOriginalDebts()[2].getFromUser(), 79774)
+        self.assertEqual(groups[1].getOriginalDebts()[2].getToUser(), 784241)
+        self.assertEqual(groups[1].getOriginalDebts()[2].getAmount(), "9.66")
+        self.assertEqual(groups[1].getOriginalDebts()[3].getFromUser(), 643871)
+        self.assertEqual(groups[1].getOriginalDebts()[3].getToUser(), 281236)
+        self.assertEqual(groups[1].getOriginalDebts()[3].getAmount(), "2520.67")
+        self.assertEqual(groups[1].getOriginalDebts()[3].getCurrencyCode(), "SGD")
+        self.assertEqual(groups[1].getOriginalDebts()[4].getFromUser(), 784241)
+        self.assertEqual(groups[1].getOriginalDebts()[4].getToUser(), 281236)
+        self.assertEqual(groups[1].getOriginalDebts()[4].getAmount(), "761.61")
+        self.assertEqual(groups[1].getOriginalDebts()[4].getCurrencyCode(), "SGD")
+        self.assertEqual(groups[1].getOriginalDebts()[5].getCurrencyCode(), "SGD")
+        self.assertEqual(groups[1].getOriginalDebts()[5].getFromUser(), 643871)
+        self.assertEqual(groups[1].getOriginalDebts()[5].getToUser(), 784241)
+        self.assertEqual(groups[1].getOriginalDebts()[5].getAmount(), "751.95")
+        self.assertEqual(len(groups[1].getSimplifiedDebts()), 2)
+        self.assertEqual(groups[1].getSimplifiedDebts()[0].getFromUser(), 79774)
+        self.assertEqual(groups[1].getSimplifiedDebts()[0].getToUser(), 281236)
+        self.assertEqual(groups[1].getSimplifiedDebts()[0].getAmount(), "20.13")
+        self.assertEqual(groups[1].getSimplifiedDebts()[0].getCurrencyCode(), "SGD")
+        self.assertEqual(groups[1].getSimplifiedDebts()[1].getFromUser(), 643871)
+        self.assertEqual(groups[1].getSimplifiedDebts()[1].getToUser(), 281236)
+        self.assertEqual(groups[1].getSimplifiedDebts()[1].getAmount(), "957.89")
+        self.assertEqual(groups[1].getSimplifiedDebts()[1].getCurrencyCode(), "SGD")
+        self.assertEqual(groups[1].getWhiteBoard(), None)
+        self.assertEqual(groups[1].getType(), "apartment")
+        self.assertEqual(groups[1].getInviteLink(), "https://www.splitwise.com/join/d7bsHriQF5A+1pjy")
+        # self.assertEqual(groups[1].getAvatar().getOriginal(
+        # ),
+        # "https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg")
+        # self.assertEqual(groups[1].getAvatar().getXxlarge(
+        # ),
+        # "https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/xxlarge_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg")
+        # self.assertEqual(groups[1].getAvatar().getXlarge(
+        # ),
+        # "https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/xlarge_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg")
+        # self.assertEqual(groups[1].getAvatar().getLarge(
+        # ),
+        # "https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/large_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg")
+        # self.assertEqual(groups[1].getAvatar().getMedium(
+        # ),
+        # "https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/medium_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg")
+        # self.assertEqual(groups[1].getAvatar().getSmall(
+        # ),
+        # "https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/small_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg")
+        # self.assertEqual(groups[1].getCoverPhoto().getXxlarge(
+        # ),
+        # "https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/xxlarge_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg")
+        # self.assertEqual(groups[1].getCoverPhoto().getXlarge(
+        # ),
+        # "https://splitwise.s3.amazonaws.com/uploads/group/avatar/10843533/xlarge_a3734b4d-817e-42f4-9763-8001b12e33b8.jpeg")
+
+    def test_getGroups_exception(self, mockMakeRequest):
+        mockMakeRequest.side_effect = Exception(
+            "Invalid response %s. Please check your consumer key and secret." % 404)
+        with self.assertRaises(Exception):
+            self.sObj.getGroups()
+        mockMakeRequest.assert_called_with(
+                "https://secure.splitwise.com/api/v3.0/get_groups")
diff --git a/tests/test_getUser.py b/tests/test_getUser.py
index fd6ae36..fcacf17 100644
--- a/tests/test_getUser.py
+++ b/tests/test_getUser.py
@@ -24,8 +24,8 @@ class GetUserTestCase(unittest.TestCase):
 
     def test_getUser_exception(self, mockMakeRequest):
         mockMakeRequest.side_effect = Exception(
-                "Invalid response %s. Please check your consumer key and secret." % 404)
+            "Invalid response %s. Please check your consumer key and secret." % 404)
         with self.assertRaises(Exception):
             self.sObj.getUser(12323)
-            mockMakeRequest.assert_called_with(
-                "https://secure.splitwise.com/api/v3.0/get_user/12323")
+        mockMakeRequest.assert_called_with(
+            "https://secure.splitwise.com/api/v3.0/get_user/12323")