input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
getBooleanFalse0 ( ) { final java . lang . Character value = '0' ; final io . trane . ndbc . value . CharacterValue wrapper = new io . trane . ndbc . value . CharacterValue ( value ) ; "<AssertPlaceHolder>" ; } getBoolean ( ) { return ( get ( ) ) == 1 ; } | org . junit . Assert . assertEquals ( false , wrapper . getBoolean ( ) ) |
testSetRange ( ) { K key = keyFactory . instance ( ) ; V value1 = valueFactory . instance ( ) ; V value2 = valueFactory . instance ( ) ; org . junit . Assume . assumeTrue ( ( value1 instanceof java . lang . String ) ) ; valueOps . set ( key , value1 ) ; valueOps . set ( key , value2 , 0 ) ; "<AssertPlaceHolder>" ; } ge... | org . junit . Assert . assertEquals ( value2 , valueOps . get ( key ) ) |
melPrefixIsValidDw ( ) { disableMel ( ) ; "<AssertPlaceHolder>" ; expressionManager . evaluate ( "#[mel:1]" ) ; } isValid ( java . lang . String ) { return validate ( expression ) . isSuccess ( ) ; } | org . junit . Assert . assertThat ( expressionManager . isValid ( "#[mel:1]" ) , org . hamcrest . Matchers . is ( true ) ) |
testWarningsAreCleared ( ) { java . sql . Statement stmt = con . createStatement ( ) ; stmt . execute ( "CREATE<sp>TEMP<sp>TABLE<sp>unused<sp>(a<sp>int<sp>primary<sp>key)" ) ; stmt . executeQuery ( "SELECT<sp>1" ) ; "<AssertPlaceHolder>" ; stmt . close ( ) ; } getWarnings ( ) { checkClosed ( ) ; return warnings ; } | org . junit . Assert . assertNull ( stmt . getWarnings ( ) ) |
testGetColumns ( ) { org . nd4j . linalg . api . ndarray . INDArray matrix = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 6 , 6 ) . reshape ( 2 , 3 ) ; log . info ( "Original:<sp>{}" , matrix ) ; org . nd4j . linalg . api . ndarray . INDArray matrixGet = matrix . getColumns ( new int [ ] { 1 , 2 } ) ; org . nd... | org . junit . Assert . assertEquals ( matrixAssertion , matrixGet ) |
testToMap ( ) { org . apache . ambari . server . collections . Predicate mockPredicate1 = createStrictMock ( org . apache . ambari . server . collections . Predicate . class ) ; expect ( mockPredicate1 . toMap ( ) ) . andReturn ( java . util . Collections . singletonMap ( "nop" , "foo" ) ) . times ( 1 ) ; org . apache ... | org . junit . Assert . assertEquals ( expectedMap , actualMap ) |
testParameter ( ) { final net . violet . platform . api . actions . Action theAction = new net . violet . platform . api . actions . press . Get ( ) ; final net . violet . platform . api . callers . APICaller caller = getPublicApplicationAPICaller ( ) ; final java . util . Map < java . lang . String , java . lang . Obj... | org . junit . Assert . assertNotNull ( theResult ) |
bigDataInMap ( ) { final byte [ ] data = new byte [ ( 16 * 1024 ) * 1024 ] ; rnd . nextBytes ( data ) ; data [ 1 ] = 0 ; data [ 3 ] = 0 ; data [ 5 ] = 0 ; org . apache . flink . test . streaming . runtime . BigUserProgramJobSubmitITCase . CollectingSink resultSink = new org . apache . flink . test . streaming . runtime... | org . junit . Assert . assertEquals ( expected , result ) |
convertList ( ) { com . fasterxml . jackson . databind . node . ArrayNode jsonNodes = new com . fasterxml . jackson . databind . node . ArrayNode ( factory ) ; com . fasterxml . jackson . databind . node . ObjectNode objectNode = new com . fasterxml . jackson . databind . node . ObjectNode ( factory ) ; objectNode . pu... | org . junit . Assert . assertEquals ( "data" , objects . get ( 0 ) ) |
testCompositeDatasetReconfigure ( ) { io . cdap . cdap . api . dataset . lib . CompositeDatasetDefinition composite = new io . cdap . cdap . api . dataset . lib . CompositeDatasetDefinition ( "composite" , "pedantic" , new io . cdap . cdap . api . dataset . lib . PedanticDatasetDefinition ( "pedantic" ) ) { @ io . cdap... | org . junit . Assert . assertEquals ( spec , respec ) |
restGetShouldTimeout ( ) { java . lang . String uri = java . lang . String . format ( "http://localhost:%d/get" , mockServerRule . getPort ( ) ) ; mockServerClient . when ( request ( ) . withMethod ( "GET" ) . withPath ( "/get" ) ) . respond ( response ( ) . withBody ( "{\"get\":\"success\"}" ) ) ; java . util . Map < ... | org . junit . Assert . assertNull ( actual ) |
execute ( ) { net . simon987 . server . assembly . Status status = new net . simon987 . server . assembly . Status ( ) ; status . clear ( ) ; net . simon987 . server . assembly . instruction . BrkInstruction brkInstruction = new net . simon987 . server . assembly . instruction . BrkInstruction ( ) ; brkInstruction . ex... | org . junit . Assert . assertEquals ( true , status . isBreakFlag ( ) ) |
two_$parent_field_comparison_returns_false_when_expression_false ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'field':'field6.nf1.$parent.$parent.field4','op':'<','rfield':'field6.nf1.$parent.$parent.field3'}" ) ; com . redh... | org . junit . Assert . assertFalse ( ctx . getResult ( ) ) |
testParseISODateInArray ( ) { final java . text . SimpleDateFormat format = new java . text . SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ss.SSSZ" ) ; final java . lang . Object doc = com . allanbank . mongodb . bson . json . Json . parse ( "{<sp>a<sp>:<sp>[ISODate('2012-07-14T01:00:00.000'),ISODate('2012-07-14')]<sp>}" ) ;... | org . junit . Assert . assertEquals ( b . build ( ) , doc ) |
testQueryCollection3 ( ) { java . util . List < org . apache . cxf . jaxrs . ext . search . jpa . Book > books = queryBooks ( "reviews.book.ownerInfo.name<sp>eq<sp>'Barry'" ) ; "<AssertPlaceHolder>" ; } size ( ) { return cache . getSize ( ) ; } | org . junit . Assert . assertEquals ( 1 , books . size ( ) ) |
non_range_annotation_returns_null ( ) { org . junit . Before beforeAnnotation = getBeforeAnnotation ( ) ; java . lang . Object enrichedRequest = this . enricher . enrich ( this . originalRequest , beforeAnnotation ) ; "<AssertPlaceHolder>" ; } enrich ( java . lang . Object , java . lang . annotation . Annotation ) { if... | org . junit . Assert . assertNull ( enrichedRequest ) |
testGetJobs ( ) { org . pentaho . platform . api . engine . IPentahoSession mockPentahoSession = mock ( org . pentaho . platform . api . engine . IPentahoSession . class ) ; doReturn ( mockPentahoSession ) . when ( org . pentaho . platform . web . http . api . resources . services . SchedulerServiceTest . schedulerServ... | org . junit . Assert . assertEquals ( mockJobs , jobs ) |
getToOutputBody ( ) { just . niubi . httprequest . HttpRequestTest . handler = new just . niubi . httprequest . RequestHandler ( ) { @ just . niubi . httprequest . Override public void handle ( org . eclipse . jetty . server . Request request , javax . servlet . http . HttpServletResponse response ) { response . setSta... | org . junit . Assert . assertEquals ( "hello<sp>world" , body . get ( ) ) |
shouldGetResourceAsPropertiesWithClassloader ( ) { java . util . Properties file = org . apache . ibatis . io . Resources . getResourceAsProperties ( org . apache . ibatis . io . ResourcesTest . CLASS_LOADER , org . apache . ibatis . io . JPETSTORE_PROPERTIES ) ; "<AssertPlaceHolder>" ; } getResourceAsProperties ( java... | org . junit . Assert . assertNotNull ( file ) |
testVoerRegelUitPersoonZonderIndicaties ( ) { final nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl huidigeSituatie = new nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl ( new nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortPersoonAttribuut ( nl . bz... | org . junit . Assert . assertTrue ( berichtEntiteits . isEmpty ( ) ) |
testReadComponentType ( ) { java . io . InputStream is = getClass ( ) . getResourceAsStream ( "CalculatorImpl.componentType" ) ; javax . xml . stream . XMLStreamReader reader = org . apache . tuscany . sca . interfacedef . wsdl . xml . ReadTestCase . inputFactory . createXMLStreamReader ( is ) ; org . apache . tuscany ... | org . junit . Assert . assertNotNull ( componentType ) |
whenServiceRegistryAndMetadata_thenSessionFactory ( ) { org . hibernate . boot . registry . BootstrapServiceRegistry bootstrapRegistry = new org . hibernate . boot . registry . BootstrapServiceRegistryBuilder ( ) . build ( ) ; org . hibernate . service . ServiceRegistry standardRegistry = new org . hibernate . boot . r... | org . junit . Assert . assertNotNull ( sessionFactory ) |
renderConfluencePage_asciiDocWithImageWithTitle_returnsConfluencePageContentWithImageWithTitle ( ) { java . lang . String adocContent = ".A<sp>beautiful<sp>sunset\n" + "image::sunset.jpg[]" ; org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePage asciidocConfluencePage = org . sahli . asci... | org . junit . Assert . assertThat ( asciidocConfluencePage . content ( ) , org . hamcrest . Matchers . is ( expectedContent ) ) |
extractTypeFromLoraUnknownMessage ( ) { final io . vertx . core . json . JsonObject loraMessage = org . eclipse . hono . adapter . lora . providers . LoraTestUtil . loadTestFile ( "objenious.uplink" ) ; loraMessage . put ( "type" , "bumlux" ) ; final org . eclipse . hono . adapter . lora . LoraMessageType type = provid... | org . junit . Assert . assertEquals ( LoraMessageType . UNKNOWN , type ) |
firstTest ( ) { com . microsoft . azure . management . iotcentral . v2017_07_01_privatepreview . IoTCentralTest . rgName = com . microsoft . azure . arm . utils . SdkContext . randomResourceName ( "rg" , 20 ) ; com . microsoft . azure . management . resources . ResourceGroup group = com . microsoft . azure . management... | org . junit . Assert . assertNotNull ( group ) |
testAC15CABAC ( ) { int [ ] bits = new int [ ] { 1 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 1 , 1 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 0 } ; int [ ] m = new int [ ] { 152 , 213 , 153 , 154 , 155 , 216 , 156 , 157 , 158 , 219 , 159 , 220 , 160 , 161 , 162 , 223 , 163 , 224 ,... | org . junit . Assert . assertArrayEquals ( coeffs , actual ) |
leavingAfterStartShouldTriggerRed ( ) { exam . setStart ( java . lang . System . currentTimeMillis ( ) ) ; exam . windowLeft ( ) ; "<AssertPlaceHolder>" ; } isCheating ( ) { return ! ( cheatingEvents . isEmpty ( ) ) ; } | org . junit . Assert . assertTrue ( exam . isCheating ( ) ) |
shouldLoadEmptyModel ( ) { final ro . isdc . wro . model . WroModel model = loadModelFromLocation ( "emptyModel.xml" ) ; "<AssertPlaceHolder>" ; } getGroups ( ) { return java . util . Collections . unmodifiableSet ( groups ) ; } | org . junit . Assert . assertEquals ( 0 , model . getGroups ( ) . size ( ) ) |
testHashCode ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( new java . lang . Long ( ( ( int ) ( 10 ) ) ) , new java . lang . Long ( ( ( int ) ( 10 ) ) ) ) |
testBuildWithOrderBy ( ) { org . lnu . is . domain . department . contact . DepartmentContact context = new org . lnu . is . domain . department . contact . DepartmentContact ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "department" , org . lnu . is . pagination . O... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testGenericListMap_rt ( ) { org . apache . servicecomb . it . schema . Generic < java . util . Map < java . lang . String , java . util . List < java . lang . String > > > mapListGeneric = new org . apache . servicecomb . it . schema . Generic ( ) ; java . util . Map < java . lang . String , java . util . List < java .... | org . junit . Assert . assertEquals ( test , "hello" ) |
validPid ( ) { if ( jnr . ffi . Platform . getNativePlatform ( ) . isUnix ( ) ) { long pid = - 1 ; try { pid = jnr . posix . SpawnTest . posix . posix_spawnp ( "true" , jnr . posix . SpawnTest . emptyActions , java . util . Arrays . asList ( "true" ) , jnr . posix . SpawnTest . emptyEnv ) ; "<AssertPlaceHolder>" ; } fi... | org . junit . Assert . assertTrue ( ( pid != ( - 1 ) ) ) |
should_self_traverse_node ( ) { int k = 4 ; java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > input = new java . util . ArrayList < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > ( ) ; input . add ( KPN ( k , "AAAA" , 1 , 11 , false ) ) ; au . edu . wehi . idsv . debr... | org . junit . Assert . assertEquals ( 11 , best . size ( ) ) |
testLogBadTimeslot ( ) { com . hp . application . automation . tools . sse . sdk . Client client = new com . hp . application . automation . tools . sse . sdk . TestEventLogHandler . MockRestClientBadTimeslot ( URL , DOMAIN , PROJECT , USER ) ; com . hp . application . automation . tools . sse . sdk . handler . EventLo... | org . junit . Assert . assertTrue ( isOk ) |
testBookKeeperCommonShade ( ) { java . lang . Class . forName ( "dlshade.org.apache.bookkeeper.common.util.OrderedExecutor" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
testSearchMCS ( ) { try { org . openscience . cdk . smiles . SmilesParser sp = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomContainer target = null ; target = sp . parseSmiles ( "C\\C=C/Nc1cccc(... | org . junit . Assert . assertNotNull ( smsd1 . getFirstMapping ( ) ) |
testFromEbXMLLeafClass ( ) { org . openehealth . ipf . commons . ihe . xds . core . ebxml . EbXMLQueryResponse ebXML = transformer . toEbXML ( responseLeafClass ) ; org . openehealth . ipf . commons . ihe . xds . core . responses . QueryResponse result = transformer . fromEbXML ( ebXML ) ; "<AssertPlaceHolder>" ; } fro... | org . junit . Assert . assertEquals ( responseLeafClass , result ) |
testGetAllDocuments ( ) { gov . hhs . fha . nhinc . docrepository . adapter . service . DocumentService documentService = getDocumentServiceWithMockDaos ( ) ; java . util . List < gov . hhs . fha . nhinc . docrepository . adapter . model . DocumentMetadata > documents = new java . util . ArrayList ( ) ; when ( DOCUMENT... | org . junit . Assert . assertEquals ( documents , results ) |
testGetMissingPathsFailure ( ) { org . apache . zookeeper . ZooKeeper mockZk = mock ( org . apache . zookeeper . ZooKeeper . class ) ; org . apache . distributedlog . ZooKeeperClient mockZkc = mock ( org . apache . distributedlog . ZooKeeperClient . class ) ; when ( mockZkc . get ( ) ) . thenReturn ( mockZk ) ; doAnswe... | org . junit . Assert . assertEquals ( Code . BADVERSION , zke . getKeeperExceptionCode ( ) ) |
testOperator_lessEqualsThanNumberNull ( ) { java . lang . Number x = 12 ; java . lang . Number y = null ; boolean resutl = org . eclipse . smarthome . model . script . lib . NumberExtensions . operator_lessEqualsThan ( x , y ) ; "<AssertPlaceHolder>" ; } operator_lessEqualsThan ( java . lang . Number , java . lang . Nu... | org . junit . Assert . assertFalse ( resutl ) |
testAnd3 ( ) { org . infinispan . query . dsl . QueryFactory qf = org . infinispan . all . embeddedquery . QueryDslConditionsTest . getQueryFactory ( ) ; org . infinispan . query . dsl . Query q = qf . from ( org . infinispan . all . embeddedquery . QueryDslConditionsTest . getModelFactory ( ) . getUserImplClass ( ) ) ... | org . junit . Assert . assertEquals ( 0 , list . size ( ) ) |
test02WindowSimple ( ) { final com . jogamp . opengl . test . junit . newt . GLCapabilities caps = new com . jogamp . opengl . test . junit . newt . GLCapabilities ( com . jogamp . opengl . test . junit . newt . TestGLWindows01NEWT . glp ) ; "<AssertPlaceHolder>" ; final com . jogamp . opengl . test . junit . newt . GL... | org . junit . Assert . assertNotNull ( caps ) |
Test37 ( ) { cc . iqa . iquery . iQueryParser parser = iQueryIdeParser . createParser ( ">><sp>:button" ) ; java . util . List < cc . iqa . iquery . ITreeNode > candidates = getRoot ( ) ; java . util . List < cc . iqa . iquery . ITreeNode > outTreeNodeList = parser . query ( candidates ) ; "<AssertPlaceHolder>" ; } get... | org . junit . Assert . assertTrue ( ( ( outTreeNodeList . size ( ) ) == 6 ) ) |
testGetNumberOfIfExpressions01 ( ) { java . lang . StringBuffer file = new java . lang . StringBuffer ( ) ; file . append ( "context<sp>Type1<sp>inv:<sp>if<sp>true<sp>then<sp>false<sp>else<sp>true<sp>endif\n" ) ; file . append ( "context<sp>Type1<sp>inv:<sp>if<sp>false<sp>then<sp>true<sp>else<sp>false<sp>endif\n" ) ; c... | org . junit . Assert . assertEquals ( 2 , metric . getNumberOfIfExpressions ( ) ) |
testGetDatabaseConnectionWithIncorrectId ( ) { de . metanome . backend . results_db . HibernateUtil . clear ( ) ; de . metanome . backend . results_db . DatabaseConnection actualDbConnection = dbResource . get ( 2 ) ; "<AssertPlaceHolder>" ; de . metanome . backend . results_db . HibernateUtil . clear ( ) ; } get ( lon... | org . junit . Assert . assertEquals ( null , actualDbConnection ) |
checkDisable ( ) { org . mariadb . jdbc . UrlParser jdbc = org . mariadb . jdbc . UrlParser . parse ( "jdbc:mysql://localhost/test?disableMariaDbDriver" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return org . mariadb . jdbc . UrlParser . parse ( url , new java . util . Properties ( ) ) ; } | org . junit . Assert . assertTrue ( ( jdbc == null ) ) |
testDiToAvroFloat ( ) { org . apache . avro . Schema expectedSchema = org . talend . daikon . avro . AvroUtils . _float ( ) ; org . apache . avro . Schema designSchema = org . apache . avro . SchemaBuilder . builder ( ) . record ( "Record" ) . fields ( ) . name ( "booleanField" ) . type ( ) . booleanType ( ) . noDefaul... | org . junit . Assert . assertEquals ( expectedSchema , actualSchema ) |
behaves_as_if_it_were_the_underlying_key ( ) { com . noodlesandwich . rekord . Rekord < com . noodlesandwich . rekord . keys . CopiedKeyTest . Bratwurst > bratwurst = com . noodlesandwich . rekord . keys . CopiedKeyTest . Bratwurst . rekord . with ( com . noodlesandwich . rekord . keys . CopiedKeyTest . Bratwurst . cur... | org . junit . Assert . assertThat ( bratwurst . get ( com . noodlesandwich . rekord . keys . CopiedKeyTest . Bratwurst . curvature ) , org . hamcrest . Matchers . is ( 0.7 ) ) |
testGetServicesByCriteria_Tagging_TagDefinedForUserLocale ( ) { container . login ( org . oscm . serviceprovisioningservice . bean . SearchServiceBeanListIT . customerUserKey , org . oscm . serviceprovisioningservice . bean . ROLE_ORGANIZATION_ADMIN ) ; org . oscm . serviceprovisioningservice . bean . SearchServiceBean... | org . junit . Assert . assertEquals ( 3 , products . size ( ) ) |
testFindActivityDetails ( ) { javax . ws . rs . core . Response response = serviceDelegator . viewActivities ( ORCID ) ; "<AssertPlaceHolder>" ; org . orcid . jaxb . model . v3 . rc2 . record . summary . ActivitiesSummary summary = ( ( org . orcid . jaxb . model . v3 . rc2 . record . summary . ActivitiesSummary ) ( res... | org . junit . Assert . assertNotNull ( response ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . change . tracking . model . CTEntryAggregate > ctEntryAggregates = _persistence . fetchBy... | org . junit . Assert . assertTrue ( ctEntryAggregates . isEmpty ( ) ) |
shouldRejectNullLbLimitName ( ) { lbLimitGroup . setName ( null ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = lbLimitGroupValidator . validate ( lbLimitGroup , HttpRequestType . PUT ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results .... | org . junit . Assert . assertFalse ( resultMessage ( result , HttpRequestType . PUT ) , result . passedValidation ( ) ) |
testNoChange ( ) { final org . bff . javampd . server . ConnectionChangeEvent [ ] changeEvent = new org . bff . javampd . server . ConnectionChangeEvent [ 1 ] ; connectionMonitor . addConnectionChangeListener ( ( event ) -> changeEvent [ 0 ] = event ) ; when ( server . isConnected ( ) ) . thenReturn ( true ) ; connecti... | org . junit . Assert . assertNull ( changeEvent [ 0 ] ) |
testFindFirstWithEmptyPathNonMatchingType ( ) { final com . allanbank . mongodb . bson . element . DocumentElement element = new com . allanbank . mongodb . bson . element . DocumentElement ( "foo" , new com . allanbank . mongodb . bson . element . BooleanElement ( "1" , false ) ) ; final com . allanbank . mongodb . bs... | org . junit . Assert . assertNull ( found ) |
javaAPIIteratorTest ( ) { java . util . Set < java . lang . String > simpsons = new java . util . HashSet ( ) ; simpsons . add ( "Homer" ) ; simpsons . add ( "Bart" ) ; simpsons . add ( "Margie" ) ; java . util . Iterator < java . lang . String > simpsonsItr = simpsons . iterator ( ) ; while ( simpsonsItr . hasNext ( )... | org . junit . Assert . assertEquals ( 0 , simpsons . size ( ) ) |
testThrowCheckedException ( ) { java . io . IOException expected = new java . io . IOException ( "EXPECTED<sp>ERROR" ) ; java . io . IOException actual = null ; try { org . slieb . throwables . BiConsumerWithThrowable . aBiConsumerThatUnsafelyThrowsUnchecked ( ( v1 , v2 ) -> { throw expected ; } ) . accept ( null , nul... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldGetFirstColumn ( ) { double [ ] values = new double [ ] { 1 , 2 , 3 , 4 } ; int [ ] [ ] indices = new int [ ] [ ] { new int [ ] { 0 , 3 } , new int [ ] { 1 , 2 } , new int [ ] { 2 , 1 } , new int [ ] { 3 , 4 } } ; org . nd4j . linalg . api . ndarray . INDArray sparseNDArray = org . nd4j . linalg . factory . Nd4j ... | org . junit . Assert . assertEquals ( 0 , sparseView . nnz ( ) ) |
testPlatformIdNamesAreAllLowerCase ( ) { for ( com . bc . ceres . core . runtime . internal . Platform . ID platformId : Platform . ID . values ( ) ) { "<AssertPlaceHolder>" ; } } toString ( ) { return languageName ; } | org . junit . Assert . assertEquals ( platformId . toString ( ) . toLowerCase ( ) , platformId . toString ( ) ) |
testListVersionUpdateForAuthorizationListChangedReceivedEvent ( ) { listener . handle ( new io . motown . operatorapi . viewmodel . AuthorizationListChangedEvent ( CHARGING_STATION_ID , LIST_VERSION , AuthorizationListUpdateType . FULL , IDENTIFYING_TOKENS , IDENTITY_CONTEXT ) ) ; io . motown . operatorapi . viewmodel ... | org . junit . Assert . assertTrue ( ( ( cs . getLocalAuthorizationListVersion ( ) ) == ( LIST_VERSION ) ) ) |
shouldNotEqualsEventsWhenLessThanTotalCountLinesRemovedInWithoutOverflownLinesRemovedEventType ( ) { com . codenjoy . dojo . tetris . model . GlassEvent event = new com . codenjoy . dojo . tetris . model . GlassEvent ( WITHOUT_OVERFLOWN_LINES_REMOVED , 10 ) ; "<AssertPlaceHolder>" ; } equals ( com . codenjoy . dojo . s... | org . junit . Assert . assertFalse ( event . equals ( new com . codenjoy . dojo . tetris . model . GlassEvent ( WITHOUT_OVERFLOWN_LINES_REMOVED , 9 ) ) ) |
testParseSimpleNoDecimals ( ) { java . lang . String source = "{1;<sp>1;<sp>1}" ; org . apache . commons . math4 . geometry . euclidean . threed . Vector3D expected = new org . apache . commons . math4 . geometry . euclidean . threed . Cartesian3D ( 1 , 1 , 1 ) ; org . apache . commons . math4 . geometry . euclidean . ... | org . junit . Assert . assertEquals ( expected , actual ) |
removesJobs_WhenDisabled ( ) { final java . lang . String jobId = "jobId" ; org . pentaho . platform . api . scheduler2 . Job job = new org . pentaho . platform . api . scheduler2 . Job ( ) ; job . setJobId ( jobId ) ; when ( scheduler . getJobs ( any ( org . pentaho . platform . api . scheduler2 . IJobFilter . class )... | org . junit . Assert . assertTrue ( listener . startup ( null ) ) |
testMsgSendSummaryMonthly ( ) { java . util . List < me . hao0 . wechat . model . data . msg . MsgSendSummary > summaries = wechat . data ( ) . msgSendSummaryMonthly ( accessToken , "2015-10-01" , "2015-10-30" ) ; "<AssertPlaceHolder>" ; for ( me . hao0 . wechat . model . data . msg . MsgSendSummary summary : summaries... | org . junit . Assert . assertNotNull ( summaries ) |
testGetUserId16 ( ) { com . liferay . portal . kernel . model . PortletInstance portletInstance = com . liferay . portal . kernel . model . PortletInstance . fromPortletInstanceKey ( getPortletInstanceKey ( getPortletInstanceKey ( ) , 1234 , "5678" ) ) ; "<AssertPlaceHolder>" ; } hasUserId ( ) { return true ; } | org . junit . Assert . assertTrue ( portletInstance . hasUserId ( ) ) |
testChangeUS2Winter ( ) { java . util . Calendar start = new java . util . GregorianCalendar ( java . util . TimeZone . getTimeZone ( "America/Los_Angeles" ) ) ; start . clear ( ) ; start . set ( 2017 , Calendar . NOVEMBER , 5 , 0 , 30 , 0 ) ; javax . ejb . ScheduleExpression schedule = new javax . ejb . ScheduleExpres... | org . junit . Assert . assertNotNull ( firstTimeout ) |
whenAddingFourVehiclesAllAtOnce_vrpShouldContainTheCorrectNuOfVehicles ( ) { com . graphhopper . jsprit . core . problem . VehicleRoutingProblem . Builder builder = VehicleRoutingProblem . Builder . newInstance ( ) ; com . graphhopper . jsprit . core . problem . vehicle . VehicleImpl v1 = VehicleImpl . Builder . newIns... | org . junit . Assert . assertEquals ( 4 , vrp . getVehicles ( ) . size ( ) ) |
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . order . type . OrderType context = new org . lnu . is . domain . order . type . OrderType ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>OrderType<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>"... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testCreateRawHandler ( ) { "<AssertPlaceHolder>" ; } createRawHandler ( org . apache . olingo . server . api . ServiceMetadata ) { return org . apache . olingo . netty . server . core . ODataNettyImpl . odata . createRawHandler ( serviceMetadata ) ; } | org . junit . Assert . assertNotNull ( odata . createRawHandler ( metadata ) ) |
testWithCustomSerde ( ) { hiveShell . start ( ) ; java . util . List < java . lang . String > actual = hiveShell . executeQuery ( java . lang . String . format ( "select<sp>*<sp>from<sp>customSerdeTable" ) ) ; java . util . List < java . lang . String > expected = java . util . Arrays . asList ( "Q\tW\tE" , "R\tT\tY" ,... | org . junit . Assert . assertEquals ( expected , actual ) |
testKeyBuildingFromRowFamily ( ) { org . apache . accumulo . core . data . Key keyBuilt = org . apache . accumulo . core . data . Key . builder ( ) . row ( "foo" ) . family ( "bar" ) . build ( ) ; org . apache . accumulo . core . data . Key keyExpected = new org . apache . accumulo . core . data . Key ( "foo" , "bar" )... | org . junit . Assert . assertEquals ( keyExpected , keyBuilt ) |
skip_negativeBytes ( ) { final java . lang . String testString = "helloWorld" ; final byte [ ] testData = testString . getBytes ( ) ; final java . io . InputStream is = new org . exist . util . io . FastByteArrayInputStream ( testData ) ; final org . exist . util . io . CachingFilterInputStream cfis = new org . exist .... | org . junit . Assert . assertEquals ( 0 , skipped ) |
testSetupProperties ( ) { properties . connection . setupProperties ( ) ; properties . module . main . setupProperties ( ) ; properties . module . setupProperties ( ) ; properties . setupProperties ( ) ; "<AssertPlaceHolder>" ; } getConnectionProperties ( ) { return connection . getEffectiveConnectionProperties ( ) ; } | org . junit . Assert . assertNotNull ( properties . getConnectionProperties ( ) ) |
testConnection ( ) { java . lang . String baseUrl = java . lang . System . getProperty ( "service.url" ) ; java . net . URL serviceUrl = new java . net . URL ( ( baseUrl + "v1/restaurants/1" ) ) ; java . net . HttpURLConnection connection = ( ( java . net . HttpURLConnection ) ( serviceUrl . openConnection ( ) ) ) ; in... | org . junit . Assert . assertEquals ( 200 , responseCode ) |
testSend ( ) { waitForTopology ( getServer ( 0 ) , 3 ) ; waitForTopology ( getServer ( 1 ) , 3 ) ; waitForTopology ( getServer ( 2 ) , 3 ) ; org . apache . activemq . artemis . api . core . SimpleString expiryQueue = org . apache . activemq . artemis . api . core . SimpleString . toSimpleString ( "expiryQueue" ) ; org ... | org . junit . Assert . assertNotNull ( message ) |
testGetMaxBondOrderImplH ( ) { org . openscience . cdk . interfaces . IAtomContainer container = ( ( org . openscience . cdk . interfaces . IAtomContainer ) ( newChemObject ( ) ) ) ; org . openscience . cdk . interfaces . IChemObjectBuilder builder = container . getBuilder ( ) ; org . openscience . cdk . interfaces . I... | org . junit . Assert . assertThat ( container . getMaximumBondOrder ( a ) , org . hamcrest . CoreMatchers . is ( IBond . Order . SINGLE ) ) |
testValidateAndTrimSecurityRoleFunctionCreateRequest ( ) { org . finra . herd . model . api . xml . SecurityRoleFunctionKey securityRoleFunctionKey = new org . finra . herd . model . api . xml . SecurityRoleFunctionKey ( SECURITY_ROLE , SECURITY_FUNCTION ) ; org . finra . herd . model . api . xml . SecurityRoleFunction... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . SecurityRoleFunctionCreateRequest ( new org . finra . herd . model . api . xml . SecurityRoleFunctionKey ( SECURITY_ROLE_2 , SECURITY_FUNCTION_2 ) ) , securityRoleFunctionCreateRequest ) |
GetAuthorizationUrl_ReturnsCorrectUrl_WithEmptyState ( ) { try { com . microsoft . bingads . OAuthWebAuthCodeGrant auth = com . microsoft . bingads . OAuthTest . CreateWebAuth ( "test_id" , "test_secret" ) ; auth . setState ( "" ) ; java . net . URL authorizationUrl = auth . getAuthorizationEndpoint ( ) ; java . net . ... | org . junit . Assert . assertEquals ( expectedUrl , authorizationUrl ) |
getByCodeWithUpperCaseAlpha2CodeShouldReturnCountry ( ) { for ( org . iban4j . CountryCode code : org . iban4j . CountryCode . values ( ) ) { org . iban4j . CountryCode newCode = org . iban4j . CountryCode . getByCode ( code . getAlpha2 ( ) . toUpperCase ( ) ) ; "<AssertPlaceHolder>" ; } } getAlpha2 ( ) { return name (... | org . junit . Assert . assertThat ( newCode , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( code ) ) ) |
testSemEvidence ( ) { edu . cmu . tetrad . graph . Graph graph = constructGraph1 ( ) ; edu . cmu . tetrad . sem . SemPm semPm = new edu . cmu . tetrad . sem . SemPm ( graph ) ; edu . cmu . tetrad . sem . SemIm semIm = new edu . cmu . tetrad . sem . SemIm ( semPm ) ; edu . cmu . tetrad . sem . SemEvidence evidence = new... | org . junit . Assert . assertTrue ( evidence . isManipulated ( 1 ) ) |
testSetGetViewName ( ) { org . apache . ambari . server . orm . entities . ViewEntityEntity viewEntityEntity = new org . apache . ambari . server . orm . entities . ViewEntityEntity ( ) ; viewEntityEntity . setViewName ( "foo" ) ; "<AssertPlaceHolder>" ; } getViewName ( ) { return viewName ; } | org . junit . Assert . assertEquals ( "foo" , viewEntityEntity . getViewName ( ) ) |
testRSubi ( ) { org . nd4j . linalg . api . ndarray . INDArray n2 = org . nd4j . linalg . factory . Nd4j . ones ( 2 ) ; org . nd4j . linalg . api . ndarray . INDArray n2Assertion = org . nd4j . linalg . factory . Nd4j . zeros ( 2 ) ; org . nd4j . linalg . api . ndarray . INDArray nRsubi = n2 . rsubi ( 1 ) ; "<AssertPla... | org . junit . Assert . assertEquals ( n2Assertion , nRsubi ) |
getMonth_A$Calendar_jun12 ( ) { java . lang . Integer expected = 1 ; java . util . Calendar arg0 = java . util . Calendar . getInstance ( ) ; arg0 . set ( Calendar . MONTH , 12 ) ; java . lang . Integer actual = com . github . seratch . taskun . util . CalendarUtil . getMonth ( arg0 ) ; "<AssertPlaceHolder>" ; } getMon... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetBiServerBaseUrl_fromInvalidWebXmlLocation ( ) { doReturn ( consoleConfig ) . when ( spyAppConfigProperties ) . getConsoleConfig ( ) ; when ( consoleConfig . getBaseUrl ( ) ) . thenReturn ( null ) ; when ( spyAppConfigProperties . getWarPath ( ) ) . thenReturn ( "test-res" ) ; java . lang . String baseUrl = spyAp... | org . junit . Assert . assertEquals ( AppConfigProperties . DEFAULT_BISERVER_BASE_URL , baseUrl ) |
testSerialization ( ) { org . jfree . data . time . ohlc . OHLCSeriesCollection c1 = new org . jfree . data . time . ohlc . OHLCSeriesCollection ( ) ; org . jfree . data . time . ohlc . OHLCSeries s1 = new org . jfree . data . time . ohlc . OHLCSeries ( "Series" ) ; s1 . add ( new org . jfree . data . time . Year ( 200... | org . junit . Assert . assertEquals ( c1 , c2 ) |
isSubQueryWithLongAndLowerCaseWorking ( ) { if ( isBatoo ( ) ) { return ; } final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityTwo<sp>r<sp>" + "<sp>where<sp>r.id<sp>in<sp>(select<sp>sub.id<sp>from<sp>RegularEntityOne<sp>sub<sp>where<sp>lower(sub.stringAttribute)<sp>=<sp>lower('Just<sp>a<sp>String<s... | org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) == 1 ) ) |
whenSaturatedSubstractTwoIntegerValues_shouldSubstractThemAndReturnTheResult ( ) { int result = com . google . common . math . IntMath . saturatedSubtract ( 6 , 2 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 4 , result ) |
testConstructor ( ) { org . onosproject . routing . bgp . BgpRouteEntry bgpRouteEntry = generateBgpRouteEntry ( ) ; java . lang . String expectedString = "BgpRouteEntry{prefix=1.2.3.0/24,<sp>nextHop=5.6.7.8,<sp>" + ( ( ( "bgpId=10.0.0.1,<sp>origin=IGP,<sp>asPath=AsPath{pathSegments=" + "[PathSegment{type=AS_SEQUENCE,<s... | org . junit . Assert . assertThat ( bgpRouteEntry . toString ( ) , org . hamcrest . Matchers . is ( expectedString ) ) |
testInsertRetrieveEmbeddedObject ( ) { net . vz . mongodb . jackson . mock . MockObject object = new net . vz . mongodb . jackson . mock . MockObject ( ) ; object . object = new net . vz . mongodb . jackson . mock . MockEmbeddedObject ( ) ; object . object . value = "blah" ; coll . insert ( object ) ; net . vz . mongod... | org . junit . Assert . assertEquals ( object . object , result . object ) |
test_no_schematype ( ) { try { getValidator ( "sw-config-no-schematype.xml" ) ; } catch ( java . lang . RuntimeException e ) { boolean exceptionText = e . getMessage ( ) . contains ( "SWITCHYARD017219" ) ; "<AssertPlaceHolder>" ; } } getMessage ( ) { return _message ; } | org . junit . Assert . assertTrue ( exceptionText ) |
setInvalidDataSourceAndExecutorConfigurationTest ( ) { java . lang . String [ ] origEntries = getConfigurationData ( null ) ; org . glassfish . javaee7 . batch . test . util . CommandUtil cmd = org . glassfish . javaee7 . batch . test . util . CommandUtil . getInstance ( ) . executeCommandAndGetAsList ( "asadmin" , org... | org . junit . Assert . assertTrue ( ( ( ( ! ( cmd . ranOK ( ) ) ) && ( newEntries [ 0 ] . equals ( origEntries [ 0 ] ) ) ) && ( newEntries [ 1 ] . equals ( origEntries [ 1 ] ) ) ) ) |
shouldTruncatePropertyBytes ( ) { final uk . gov . gchq . gaffer . data . element . Properties properties = new uk . gov . gchq . gaffer . data . element . Properties ( ) { { put ( HBasePropertyNames . COLUMN_QUALIFIER , 1 ) ; put ( HBasePropertyNames . COLUMN_QUALIFIER_2 , 2 ) ; put ( HBasePropertyNames . COLUMN_QUALI... | org . junit . Assert . assertArrayEquals ( expectedTruncatedPropertyBytes , truncatedPropertyBytes ) |
testOnFlowUpdatePreSrcFlowErr ( ) { java . lang . String networkId = org . o3project . odenos . component . aggregator . AggregatorTest . AGGREGATED_NW_ID ; org . o3project . odenos . core . component . network . flow . Flow prev = new org . o3project . odenos . core . component . network . flow . Flow ( ) ; prev . set... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) ) |
testSpecExample1_01 ( ) { org . apache . tomcat . websocket . server . UriTemplate t = new org . apache . tomcat . websocket . server . UriTemplate ( "/a/b" ) ; java . util . Map < java . lang . String , java . lang . String > result = t . match ( new org . apache . tomcat . websocket . server . UriTemplate ( "/a/b" ) ... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testUserJSInjectionIsFalseByDefault ( ) { "<AssertPlaceHolder>" ; } userJSInjection ( ) { return userJSInjection ; } | org . junit . Assert . assertFalse ( configuration . userJSInjection ( ) ) |
testIsIncluded_enabled_invalidHttpHeaders ( ) { final com . adobe . acs . commons . replication . dispatcher . DispatcherFlushFilter filter = new com . adobe . acs . commons . replication . dispatcher . DispatcherFlushFilter ( ) ; when ( agent . isEnabled ( ) ) . thenReturn ( true ) ; when ( agentConfig . getTransportU... | org . junit . Assert . assertEquals ( expected , actual ) |
testEnsureCapacityUnknown2 ( ) { final org . jacoco . core . internal . analysis . SourceNodeImpl node = new org . jacoco . core . internal . analysis . SourceNodeImpl ( org . jacoco . core . analysis . ICoverageNode . ElementType . CLASS , "Foo" ) ; node . ensureCapacity ( ISourceNode . UNKNOWN_LINE , 10 ) ; "<AssertP... | org . junit . Assert . assertEquals ( LineImpl . EMPTY , node . getLine ( 10 ) ) |
getQueryParts_shouldProcessSimpleSpaceAsSeparator ( ) { java . lang . String [ ] actual = patientSearchCriteria . getQueryParts ( "Anton<sp>Bert<sp>Charles" ) ; java . lang . String [ ] expected = new java . lang . String [ ] { "Anton" , "Bert" , "Charles" } ; "<AssertPlaceHolder>" ; } getQueryParts ( java . lang . Str... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
testIsLightWeight ( ) { final com . allanbank . mongodb . client . FutureCallback < java . lang . Boolean > future = new com . allanbank . mongodb . client . FutureCallback < java . lang . Boolean > ( ) ; final com . allanbank . mongodb . client . connection . auth . X509ResponseCallback cb = new com . allanbank . mong... | org . junit . Assert . assertThat ( cb . isLightWeight ( ) , org . hamcrest . Matchers . is ( true ) ) |
testRoleBFailAuthorized ( ) { "<AssertPlaceHolder>" ; securedEjb . roleB ( ) ; } | org . junit . Assert . assertNotNull ( securedEjb ) |
testGetNodeAsElement ( ) { java . io . InputStream is = new java . io . ByteArrayInputStream ( "<foo><bar/></foo>" . getBytes ( ) ) ; org . apache . cxf . jaxrs . ext . xml . XMLSource xp = new org . apache . cxf . jaxrs . ext . xml . XMLSource ( is ) ; xp . setBuffering ( ) ; org . w3c . dom . Element element = xp . g... | org . junit . Assert . assertNotNull ( element ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.