<commit_before>package com.mysema.query.scala;

//import com.mysema.query._
import com.mysema.query.types._
import com.mysema.query.scala.Queries._
import com.mysema.query.scala.Conversions._

import com.mysema.query.jpa.impl.JPAQuery
import com.mysema.query.scala.Conversions._

import javax.persistence._;
import org.junit.{ Test, Before, After };
import org.junit.Assert._

class QueriesTest {
    
  var entityManager: EntityManager = _;
  val user = alias(classOf[User])
  val department = alias(classOf[Department])
  val company = alias(classOf[Company])

  @Before 
  def before {
    var entityManagerFactory = Persistence.createEntityManagerFactory("hsqldb")
    entityManager = entityManagerFactory.createEntityManager()
  }  
   
  @Test 
  def Unique {
    query from(user) unique(user) getOrElse(new User());  
  }
  
  def query() = new JPAQuery(entityManager)
  
}<commit_msg>added test for single method<commit_after>package com.mysema.query.scala;

//import com.mysema.query._
import com.mysema.query.types._
import com.mysema.query.scala.Queries._
import com.mysema.query.scala.Conversions._

import com.mysema.query.jpa.impl.JPAQuery
import com.mysema.query.scala.Conversions._

import javax.persistence._;
import org.junit.{ Test, Before, After };
import org.junit.Assert._

class QueriesTest {
    
  var entityManager: EntityManager = _;
  val user = alias(classOf[User])
  val department = alias(classOf[Department])
  val company = alias(classOf[Company])

  @Before 
  def before {
    var entityManagerFactory = Persistence.createEntityManagerFactory("hsqldb")
    entityManager = entityManagerFactory.createEntityManager()
  }  
   
  @Test 
  def Unique {
    query from(user) unique(user) getOrElse(new User());  
  }
  
  @Test 
  def Single {
    query from(user) single(user) getOrElse(new User());  
  }
  
  def query() = new JPAQuery(entityManager)
  
}
{'fraction_non_alphanumeric': 0.1111699311805188, 'fraction_numerical': 0.0, 'mean_word_length': 4.04, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6542348', 'n_tokens_mistral': 642, 'n_tokens_neox': 620, 'n_words': 126}