<commit_before>/**
 * Copyright (C) 2010-12 Brookhaven National Laboratory
 * All rights reserved. Use is subject to license terms.
 */
package org.epics.util.time;

import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.*;
import org.junit.Test;

/**
 *
 * @author carcassi
 */
public class TimeStampTest {

    public TimeStampTest() {
    }
    
    @Test
    public void time1() {
        TimeStamp time = TimeStamp.time(100, 10000000);
        assertThat(time.getSec(), equalTo(100L));
        assertThat(time.getNanoSec(), equalTo(10000000));
    }
}<commit_msg>Adding test for TimeStamp.<commit_after>/**
 * Copyright (C) 2010-12 Brookhaven National Laboratory
 * All rights reserved. Use is subject to license terms.
 */
package org.epics.util.time;

import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.*;
import org.junit.Test;

/**
 *
 * @author carcassi
 */
public class TimeStampTest {

    public TimeStampTest() {
    }
    
    @Test
    public void time1() {
        TimeStamp time = TimeStamp.time(100, 10000000);
        assertThat(time.getSec(), equalTo(100L));
        assertThat(time.getNanoSec(), equalTo(10000000));
    }
    
    @Test(expected=IllegalArgumentException.class)
    public void time2() {
        TimeStamp time = TimeStamp.time(100, 1000000000);
    }
}
{'fraction_non_alphanumeric': 0.12266267763649963, 'fraction_numerical': 0.05385190725504862, 'mean_word_length': 3.220820189274448, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 5, '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': '2767742', 'n_tokens_mistral': 483, 'n_tokens_neox': 420, 'n_words': 101}