public void testUpdateExistingGroup() {
Group initialGroup = MockProvider.createMockGroup();
Group groupUpdate = MockProvider.createMockGroupUpdate();
GroupQuery sampleGroupQuery = mock(GroupQuery.class);
when(identityServiceMock.createGroupQuery()).thenReturn(sampleGroupQuery);
when(sampleGroupQuery.groupId(MockProvider.EXAMPLE_GROUP_ID)).thenReturn(sampleGroupQuery);
when(sampleGroupQuery.singleResult()).thenReturn(initialGroup);
given().pathParam("id", MockProvider.EXAMPLE_GROUP_ID)
.body(GroupDto.fromGroup(groupUpdate)).contentType(ContentType.JSON)
.then().expect().statusCode(Status.NO_CONTENT.getStatusCode())