@@ -0,0 +1,2131 @@
+/**%0A * Copyright (c) 2016, German Neuroinformatics Node (G-Node)%0A *%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted under the terms of the BSD License. See%0A * LICENSE file in the root of the Project.%0A */%0A%0Apackage org.g_node.micro.commons;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.Collections;%0Aimport java.util.List;%0Aimport org.junit.Test;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0A/**%0A * Unit tests for the %7B@link AppUtils%7D class.%0A *%0A * @author Michael Sonntag (sonntag@bio.lmu.de)%0A */%0Apublic final class AppUtilsTest %7B%0A%0A    /**%0A     * Method checks that the %7B@link AppUtils%7D getHashSHA method returns%0A     * the proper hex hash for a List of String entries.%0A     */%0A    @Test%0A    public void testGetHashSHA() %7B%0A        final String checkHexSHA = %22e5c055cdf43af5be8972d5a94c8d0182296de89b%22;%0A%0A        final ArrayList%3CString%3E testHashLower = new ArrayList%3C%3E(Arrays.asList(%22hash%22, %22me%22));%0A        assertThat(checkHexSHA.equals(AppUtils.getHashSHA(testHashLower))).isTrue();%0A%0A        final ArrayList%3CString%3E testHashMixed = new ArrayList%3C%3E(Arrays.asList(%22Hash%22, %22Me%22));%0A        assertThat(checkHexSHA.equals(AppUtils.getHashSHA(testHashMixed))).isTrue();%0A%0A        final List%3CString%3E testHashSingleEntry = Collections.singletonList(%22Hash me%22);%0A        assertThat(checkHexSHA.equals(AppUtils.getHashSHA(testHashSingleEntry))).isTrue();%0A%0A        final List%3CString%3E testDiff = Collections.singletonList(%22hashme%22);%0A        assertThat(checkHexSHA.equals(AppUtils.getHashSHA(testDiff))).isFalse();%0A    %7D%0A%0A    /**%0A     * Method checks that the method returns a valid timestamp.%0A     */%0A    @Test%0A    public void testGetTimeStamp() %7B%0A        final String testFormat = %22dd.MM.yyyy HH:mm%22;%0A        final String regEx = String.join(%22%22,%0A                %22(%5B0%5D%5B1-9%5D%7C%5B1-2%5D%5B0-9%5D%7C%5B3%5D%5B0-1%5D).(%5B0%5D%5B1-9%5D%7C%5B1%5D%5B0-2%5D).(20%5C%5Cd%5C%5Cd) %22,%0A                %22(%5B0-1%5D%5B0-9%5D%7C%5B2%5D%5B0-3%5D):%5B0-5%5D%5B0-9%5D%22);%0A%0A        final String getFormattedTimeStamp = AppUtils.getTimeStamp(testFormat);%0A        assertThat(getFormattedTimeStamp).matches(regEx);%0A    %7D%0A%0A%7D%0A

Add AppUtils timestamp test