<commit_before>package com.telekom.m2m.cot.restsdk.users;

import org.junit.Test;

import com.telekom.m2m.cot.restsdk.CloudOfThingsPlatform;

public class UsersApiTest {

	// TODO fix the logger problem below
	// private static final Logger logger =
	// LoggerFactory.getLogger(UsersApiTest.class);
	// (test inside the Maven, idea: keep it outside of the library, keep the
	// dependencies as low as possible.)
	// for integration test: assertion.
	//

	@Test
	public void testUserApiMethods() {

		CloudOfThingsPlatform platform = new CloudOfThingsPlatform("https://nbiotdemo.int2-ram.m2m.telekom.com",
				"<EMAIL>", "nbiot-Test-Pw");

		User user = new User();

		user = platform.getUsersApi().getUserByName("<EMAIL>", "nbiotdemo");
		user.setLastName("Black");
		// TODO: switch to a proper logger.
		System.out.println(user.getId());
		System.out.println(user.getEmail());
		System.out.println(user.getLastName());

		UserCollection collection = platform.getUsersApi().getUsers("nbiotdemo");

		// TODO: switch to a proper logger.
		System.out.println(collection.getUsers().length);

		GroupCollection groups = platform.getUsersApi().getGroups("nbiotdemo");

		// TODO: switch to a proper logger.
		System.out.println(groups.getGroups().length);

		Group group = platform.getUsersApi().getGroupByName("nbiotdemo", "admins");
		// TODO: switch to a proper logger.
		System.out.println(group.getName());

		CurrentUser currentuser = platform.getUsersApi().getCurrentUser();
		System.out.println(currentuser.getUserName());
		RoleCollection roles = platform.getUsersApi().getRoles();
		System.out.println(roles.getRoles().length);
	}

}
<commit_msg>More tests are included.<commit_after>package com.telekom.m2m.cot.restsdk.users;

import org.junit.Test;

import com.telekom.m2m.cot.restsdk.CloudOfThingsPlatform;

public class UsersApiTest {

	@Test
	public void testUserApiMethods() {

		CloudOfThingsPlatform platform = new CloudOfThingsPlatform("https://nbiotdemo.int2-ram.m2m.telekom.com",
				"<EMAIL>", "nbiot-Test-Pw");

		User user = new User();

		user = platform.getUsersApi().getUserByName("<EMAIL>", "nbiotdemo");
		user.setLastName("Black");
		// TODO: switch to a proper logger.
		System.out.println(user.getId());
		System.out.println(user.getEmail());
		System.out.println(user.getLastName());

		// Test the functionality of getUsers:
		UserCollection collection = platform.getUsersApi().getUsers("nbiotdemo");
		System.out.println(collection.getUsers().length);
		// Test the functionality of getGroups:
		GroupCollection groups = platform.getUsersApi().getGroups("nbiotdemo");
		System.out.println(groups.getGroups().length);
		// Test the functionality of getGroupByName:
		Group group = platform.getUsersApi().getGroupByName("nbiotdemo", "admins");
		System.out.println(group.getName());
		// Test the functionality of getRoles:
		RoleCollection roles = platform.getUsersApi().getRoles();
		System.out.println(roles.getRoles().length);

		// Test operations on current user:
		CurrentUser currentuser = platform.getUsersApi().getCurrentUser();
		platform.getUsersApi().updateCurrentUserFirstName("FirstNameFirstUpdate");

		System.out.println("Current user first name first update: " + currentuser.getFirstName());
		platform.getUsersApi().updateCurrentUserFirstName("FirstNameSecondUpdate");
		System.out.println("Current user first name second update: " + currentuser.getFirstName());

		User usertocreate = new User();
		usertocreate.setUserName("testUserNameabcdefghi");
		usertocreate.setLastName("testLastNameabcdef");
		usertocreate.setFirstName("testFirstNameabcdef");
		usertocreate.setPassword("<PASSWORD>");

		User createduser = platform.getUsersApi().createUser(usertocreate, "nbiotdemo");
		System.out.println("User name: of the created user:" + createduser.getUserName());

		// deleteuser:
		platform.getUsersApi().deleteUser(createduser, "nbiotdemo");

		System.out.println("User name of the deleted user: " + usertocreate.getUserName());

		// Now create a user and delete is by its name:
		User seconduser = new User();
		seconduser.setLastName("testLastNameabcdefh");
		seconduser.setFirstName("testFirstNameabcdefh");
		seconduser.setPassword("<PASSWORD>");
		seconduser.setUserName("SecondUserToDeleteByName4");
		User SecondCreatedUser = platform.getUsersApi().createUser(seconduser, "nbiotdemo");
		platform.getUsersApi().deleteUserByUserName("SecondUserToDeleteByName4", "nbiotdemo");

	}

}

{'fraction_non_alphanumeric': 0.13803197478045484, 'fraction_numerical': 0.002251745102454402, 'mean_word_length': 5.345714285714286, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2496767', 'n_tokens_mistral': 1453, 'n_tokens_neox': 1355, 'n_words': 262}