input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
queryString_listParameter_expectCorrectLength ( ) { com . amazonaws . serverless . proxy . model . AwsProxyRequest request = new com . amazonaws . serverless . proxy . internal . testutils . AwsProxyRequestBuilder ( "/echo/list-query-string" , "GET" ) . json ( ) . queryString ( "list" , "v1,v2,v3" ) . build ( ) ; com .... | org . junit . Assert . assertEquals ( 200 , output . getStatusCode ( ) ) |
testAuthType ( ) { javax . servlet . http . HttpServletRequest req = new org . apache . shindig . common . testing . FakeHttpServletRequest ( ) ; org . apache . shindig . auth . AuthInfoUtil . setAuthTypeForRequest ( req , "FakeAuth" ) ; "<AssertPlaceHolder>" ; } getAuthTypeFromRequest ( javax . servlet . http . HttpSe... | org . junit . Assert . assertEquals ( "FakeAuth" , org . apache . shindig . auth . AuthInfoUtil . getAuthTypeFromRequest ( req ) ) |
testGetFormatLanguageMt ( ) { System . out . println ( "getFormatLanguageMt" ) ; org . opencyc . api . NLFormat instance = org . opencyc . api . NLFormat . getInstance ( org . opencyc . api . NLFormatTest . cyc ) ; org . opencyc . cycobject . CycObject result = instance . getFormatLanguageMt ( ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertNotNull ( result ) |
testAnsiDecodePushbackSequenceNonTickSecondElmentReturnsNull ( ) { org . owasp . esapi . codecs . PushbackSequence < java . lang . Character > mockPushback = org . mockito . Mockito . mock ( org . owasp . esapi . codecs . PushbackSequence . class ) ; org . mockito . Mockito . when ( mockPushback . next ( ) ) . thenRetu... | org . junit . Assert . assertNull ( decChar ) |
testByteArrayTransfer ( ) { byte [ ] value = new byte [ ( org . apache . flink . runtime . io . network . buffer . AbstractByteBufTest . BLOCK_SIZE ) * 2 ] ; for ( int i = 0 ; i < ( ( ( buffer . capacity ( ) ) - ( org . apache . flink . runtime . io . network . buffer . AbstractByteBufTest . BLOCK_SIZE ) ) + 1 ) ; i +=... | org . junit . Assert . assertEquals ( expectedValue [ j ] , value [ j ] ) |
subEntity ( ) { com . querydsl . codegen . Type type = factory . get ( Examples . SubEntity . class ) ; "<AssertPlaceHolder>" ; } getParameters ( ) { return parameters ; } | org . junit . Assert . assertEquals ( 0 , type . getParameters ( ) . size ( ) ) |
testPow ( ) { javax . measure . Unit < ? > result = one . pow ( 10 ) ; "<AssertPlaceHolder>" ; } pow ( int ) { return new tec . uom . se . quantity . QuantityDimension ( this . pseudoUnit . pow ( n ) ) ; } | org . junit . Assert . assertEquals ( result , one ) |
getTopicSucceeds ( ) { com . microsoft . azure . sdk . iot . deps . transport . mqtt . MqttMessage mqttMessage = new com . microsoft . azure . sdk . iot . deps . transport . mqtt . MqttMessage ( tests . unit . com . microsoft . azure . sdk . iot . deps . transport . mqtt . MqttMessageTest . TEST_TOPIC ) ; new mockit . ... | org . junit . Assert . assertEquals ( tests . unit . com . microsoft . azure . sdk . iot . deps . transport . mqtt . MqttMessageTest . TEST_TOPIC , mqttMessage . getTopic ( ) ) |
testWebhdfsReadOldBehavior ( ) { org . apache . hadoop . fs . Path zonePath = new org . apache . hadoop . fs . Path ( "/TestEncryptionZone" ) ; fsWrapper . mkdir ( zonePath , org . apache . hadoop . fs . permission . FsPermission . getDirDefault ( ) , false ) ; dfsAdmin . createEncryptionZone ( zonePath , TEST_KEY , or... | org . junit . Assert . assertEquals ( ( ( org . apache . hadoop . hdfs . web . WebHdfsFileSystem . PATH_PREFIX ) + ( encryptedFilePath . toString ( ) ) ) , path ) |
testGetDefectLink_Maya ( ) { handler . addRequest ( false , "GET" , "/qcbin/rest/domains/domain/projects/project/defects/86/defect-links/2763" , 200 ) . content ( "entityServiceTest_defectLink.xml" ) ; com . hp . alm . ali . idea . model . Entity link = entityService . getDefectLink ( 86 , 2763 ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertEquals ( 2763 , link . getId ( ) ) |
manifest_jsonschemanullfalse ( ) { org . codehaus . jackson . JsonFactory f = new org . codehaus . jackson . JsonFactory ( ) ; org . json . simple . JSONObject json = new org . json . simple . JSONObject ( ) ; json . put ( "bar_version" , "1" ) ; json . put ( "box_version" , "1" ) ; json . put ( "DefaultPath" , "boxNam... | org . junit . Assert . assertFalse ( manifest . checkSchema ( ) ) |
test4 ( ) { int result = comparator . compare ( "0.1" , "0.1.1" ) ; "<AssertPlaceHolder>" ; } compare ( java . lang . String , java . lang . String ) { com . b2international . snowowl . snomed . api . rest . AntPathWildcardMatcher . AntPatternComparator . PatternInfo info1 = new com . b2international . snowowl . snomed... | org . junit . Assert . assertTrue ( ( result < 0 ) ) |
testStraightSuccess ( ) { io . fabric8 . api . Container container = createMock ( io . fabric8 . api . Container . class ) ; expect ( container . getId ( ) ) . andReturn ( "container" ) . anyTimes ( ) ; expect ( container . isAlive ( ) ) . andReturn ( true ) . anyTimes ( ) ; expect ( container . isManaged ( ) ) . andRe... | org . junit . Assert . assertTrue ( task . call ( ) ) |
shouldEmptyDeltaBeImplementerBackwardCompatible ( ) { final int major = 1 ; final int minor = 2 ; final int patch = 3 ; final org . semver . Version version = new org . semver . Version ( major , minor , patch ) ; final org . semver . Version inferedVersion = new org . semver . Delta ( org . semver . DeltaTest . EMPTY_... | org . junit . Assert . assertEquals ( new org . semver . Version ( major , minor , ( patch + 1 ) ) , inferedVersion ) |
onlyPartialMatchOK ( ) { org . kaazing . k3po . driver . internal . behavior . handler . codec . MessageDecoder decoder = new org . kaazing . k3po . driver . internal . behavior . handler . codec . ReadExactBytesDecoder ( new byte [ ] { 1 , 2 , 3 } ) ; org . jboss . netty . buffer . ChannelBuffer remainingBuffer = deco... | org . junit . Assert . assertNull ( remainingBuffer ) |
httpResponseVerification400WithErrorReason ( ) { final int status = 400 ; final byte [ ] body = new byte [ ] { 1 } ; final java . util . Map < java . lang . String , java . util . List < java . lang . String > > headerFields = new java . util . HashMap ( ) ; final byte [ ] errorReason = "{\"ExceptionMessage\":\"This<sp... | org . junit . Assert . assertThat ( expected . getMessage ( ) , org . hamcrest . CoreMatchers . is ( "{\"ExceptionMessage\":\"This<sp>is<sp>the<sp>error<sp>message\"}" ) ) |
getServiceForMarketplace ( ) { org . oscm . domobjects . Product expected = new org . oscm . domobjects . Product ( ) ; expected . setKey ( 10L ) ; expected . setAutoAssignUserEnabled ( false ) ; expected . setStatus ( ServiceStatus . ACTIVE ) ; expected . setTechnicalProduct ( new org . oscm . domobjects . TechnicalPr... | org . junit . Assert . assertEquals ( 10L , actual . getKey ( ) ) |
dogRAISingleSigmasTest ( ) { @ net . imagej . ops . filter . dog . SuppressWarnings ( "unchecked" ) final net . imglib2 . RandomAccessibleInterval < net . imglib2 . type . numeric . integer . ByteType > res = ( ( net . imglib2 . RandomAccessibleInterval < net . imglib2 . type . numeric . integer . ByteType > ) ( ops . ... | org . junit . Assert . assertNotNull ( res ) |
testWrongCharacterInHex03 ( ) { java . lang . String header = "Digest<sp>nc=яaaa" ; java . io . StringReader input = new java . io . StringReader ( header ) ; java . util . Map < java . lang . String , java . lang . String > result = org . apache . tomcat . util . http . parser . Authorization . parseAuthorizationDiges... | org . junit . Assert . assertNull ( result ) |
testSize ( ) { org . openscience . cdk . interfaces . IAdductFormula mfS = getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAdductFormula . class ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cells . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , mfS . size ( ) ) |
getPort ( ) { int expected = 10 ; org . jboss . as . network . NetworkInterfaceBinding interfaceBinding = new org . jboss . as . network . NetworkInterfaceBinding ( java . util . Collections . emptySet ( ) , java . net . InetAddress . getLocalHost ( ) ) ; org . jboss . as . network . SocketBindingManager bindingManager... | org . junit . Assert . assertSame ( expected , result ) |
testClassLoaderIdentical ( ) { cache = new org . apache . cxf . common . util . ProxyClassLoaderCache ( ) ; java . lang . ClassLoader cl1 = cache . getProxyClassLoader ( this . getClass ( ) . getClassLoader ( ) , new java . lang . Class < ? > [ ] { java . io . Closeable . class , org . apache . cxf . endpoint . Client ... | org . junit . Assert . assertTrue ( ( cl1 == cl2 ) ) |
testFilterDuplicates_All_Duplicates_No_Averages ( ) { java . util . List < org . easyrec . model . core . RecommendedItemVO < java . lang . Integer , java . lang . Integer > > recommendedItems = new java . util . ArrayList < org . easyrec . model . core . RecommendedItemVO < java . lang . Integer , java . lang . Intege... | org . junit . Assert . assertTrue ( expectedFilteredRecommendedItems . containsAll ( actualFilteredRecommendedItems ) ) |
testUpgradeAddColumnLength ( ) { requireMinimumVersion ( server . VERSION_5_6 ) ; java . sql . Connection c = context . getMaxwellConnection ( ) ; this . savedSchema . save ( c ) ; c . createStatement ( ) . executeUpdate ( "alter<sp>table<sp>`maxwell`.`columns`<sp>drop<sp>column<sp>column_length" ) ; com . zendesk . ma... | org . junit . Assert . assertEquals ( ( ( java . lang . Long ) ( 0L ) ) , ( ( java . lang . Long ) ( cd1 . getColumnLength ( ) ) ) ) |
isNotTransient ( ) { nl . jqno . equalsverifier . internal . reflection . ObjectContainer foo = new nl . jqno . equalsverifier . internal . reflection . ObjectContainer ( ) ; nl . jqno . equalsverifier . internal . reflection . FieldAccessor fieldAccessor = getAccessorFor ( foo , nl . jqno . equalsverifier . internal .... | org . junit . Assert . assertFalse ( fieldAccessor . fieldIsTransient ( ) ) |
testRegistrationEventFalse ( ) { com . emc . storageos . systemservices . impl . eventhandler . connectemc . CallHomeEventManagerTest . MockCallHomeEventManager manager = new com . emc . storageos . systemservices . impl . eventhandler . connectemc . CallHomeEventManagerTest . MockCallHomeEventManager ( ) ; com . emc .... | org . junit . Assert . assertFalse ( manager . doSendRegistration ( licenseInfo ) ) |
testTwoEdgeTooRecent ( ) { long halfDaysPriorBenchmark = ( benchmarkTimeInMillis ) - ( ( oneDayInMillis ) / 2 ) ; long twoDaysPriorBenchmark = ( benchmarkTimeInMillis ) - ( ( oneDayInMillis ) * 2 ) ; com . twitter . graphjet . hashing . SmallArrayBasedLongToDoubleMap socialProof = new com . twitter . graphjet . hashing... | org . junit . Assert . assertEquals ( true , filter . filterResult ( 1L , socialProofs ) ) |
testPasswordComparisonSucceeds ( ) { createData ( ) ; java . util . Hashtable < java . lang . String , java . lang . Object > env = new java . util . Hashtable < java . lang . String , java . lang . Object > ( ) ; env . put ( DirectoryService . JNDI_KEY , getService ( ) ) ; env . put ( Context . INITIAL_CONTEXT_FACTORY... | org . junit . Assert . assertTrue ( results . hasMore ( ) ) |
shouldNotCreateAnObjectMapperButUseTheCustomOn ( ) { org . codehaus . jackson . map . ObjectMapper mockObjectMapper = mock ( org . codehaus . jackson . map . ObjectMapper . class ) ; when ( mockCRestConfig . get ( ( ( org . codegist . crest . serializer . jackson . JacksonFactoryTest . class . getName ( ) ) + ( Jackson... | org . junit . Assert . assertEquals ( mockObjectMapper , actual ) |
testSnifferMsoXMLWrongFile ( ) { org . nuxeo . ecm . platform . mimetype . detectors . MsoXmlMimetypeSniffer sniffer = new org . nuxeo . ecm . platform . mimetype . detectors . MsoXmlMimetypeSniffer ( ) ; java . io . File otherFile = org . nuxeo . ecm . platform . mimetype . detectors . TestDetector . getFileFromTestRe... | org . junit . Assert . assertEquals ( 0 , returnedMimetype . length ) |
eq ( ) { io . robe . hibernate . criteria . api . criterion . Restriction expectedRestriction = new io . robe . hibernate . criteria . api . criterion . Restriction ( io . robe . hibernate . criteria . query . Operator . EQUALS , "name" , "kamil" ) ; io . robe . hibernate . criteria . api . criterion . Restriction rest... | org . junit . Assert . assertEquals ( expectedRestriction , restriction ) |
eventDataSerializationTestConstWithByteBuffer ( ) { final com . microsoft . azure . eventhubs . eventdata . ByteArrayOutputStream payloadStream = new com . microsoft . azure . eventhubs . eventdata . ByteArrayOutputStream ( ) ; payloadStream . write ( payload . getBytes ( ) ) ; payloadStream . write ( payload . getByte... | org . junit . Assert . assertTrue ( payload . equals ( new java . lang . String ( deSerializedEvent . getBytes ( ) ) ) ) |
testGetListRepresentation ( ) { System . out . println ( "getListRepresentation" ) ; org . wiztools . restclient . ui . RecentFilesHelper instance = new org . wiztools . restclient . ui . RecentFilesHelper ( ) ; java . io . File file1 = new java . io . File ( new java . io . File ( java . lang . System . getProperty ( ... | org . junit . Assert . assertEquals ( expResult , result ) |
testProjectionToString2 ( ) { com . hortonworks . streamline . streams . catalog . Projection projection = new com . hortonworks . streamline . streams . catalog . Projection ( "UPPER(review_id)<sp>AS<sp>\"Camel\"" , null , null , null ) ; java . lang . String str = projection . toString ( ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertEquals ( "UPPER(review_id)<sp>AS<sp>\"Camel\"" , str ) |
observe_twice_cancels_first ( ) { givenAnObservation ( support . registration . getId ( ) , new org . eclipse . leshan . core . node . LwM2mPath ( 3 , 0 , 12 ) ) ; givenAnObservation ( support . registration . getId ( ) , new org . eclipse . leshan . core . node . LwM2mPath ( 3 , 0 , 12 ) ) ; java . util . Set < org . ... | org . junit . Assert . assertEquals ( 1 , observations . size ( ) ) |
testAddInvalidRepoPolicy ( ) { org . apache . jackrabbit . oak . util . NodeUtil testRoot = getTestRoot ( ) ; testRoot . setNames ( JcrConstants . JCR_MIXINTYPES , org . apache . jackrabbit . oak . security . authorization . accesscontrol . MIX_REP_ACCESS_CONTROLLABLE ) ; org . apache . jackrabbit . oak . util . NodeUt... | org . junit . Assert . assertTrue ( e . isAccessControlViolation ( ) ) |
givenDirectedGraph_whenGetDijkstraShortestPath_thenGetNotNullPath ( ) { org . jgrapht . alg . shortestpath . DijkstraShortestPath dijkstraShortestPath = new org . jgrapht . alg . shortestpath . DijkstraShortestPath ( directedGraph ) ; java . util . List < java . lang . String > shortestPath = dijkstraShortestPath . get... | org . junit . Assert . assertNotNull ( shortestPath ) |
testPrint ( ) { java . util . Map source = new java . util . TreeMap ( ) ; source . put ( toByteBuffer ( "str" ) , toByteBuffer ( "spam" ) ) ; source . put ( toByteBuffer ( "num" ) , 42L ) ; source . put ( toByteBuffer ( "list" ) , java . util . Arrays . asList ( 1L , 2L ) ) ; org . bitlet . wetorrent . bencode . Benco... | org . junit . Assert . assertEquals ( expected , result ) |
decodeExtended ( ) { final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( extended ) ; final com . flagstone . transform . coder . SWFDecoder decoder = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; final com . flagstone . transform . coder . Context context = new co... | org . junit . Assert . assertNotNull ( fixture ) |
whenLoggerEmitsLoggingEvent_thenAppenderReceivesEvent ( ) { rootLogger . info ( "Test<sp>from<sp>{}" , this . getClass ( ) . getSimpleName ( ) ) ; com . baeldung . logback . MapAppender appender = ( ( com . baeldung . logback . MapAppender ) ( rootLogger . getAppender ( "map" ) ) ) ; "<AssertPlaceHolder>" ; } getEventM... | org . junit . Assert . assertEquals ( appender . getEventMap ( ) . size ( ) , 1 ) |
testParser_v1_OnlyInfohashPresent ( ) { java . lang . String uriTemplate = "magnet:?xt=urn:btih:%s" ; byte [ ] torrentId = new byte [ 20 ] ; java . lang . String s = java . lang . String . format ( uriTemplate , bt . protocol . Protocols . toHex ( torrentId ) ) ; bt . magnet . MagnetUri uri = bt . magnet . MagnetUriPar... | org . junit . Assert . assertArrayEquals ( torrentId , uri . getTorrentId ( ) . getBytes ( ) ) |
testForEnvironment ( ) { hudson . EnvVars environment = new hudson . EnvVars ( ) ; hudson . plugins . git . GitTool newTool = gitTool . forEnvironment ( environment ) ; "<AssertPlaceHolder>" ; } getGitExe ( ) { return getHome ( ) ; } | org . junit . Assert . assertEquals ( gitTool . getGitExe ( ) , newTool . getGitExe ( ) ) |
testStreamInOutWithName ( ) { cancelForVersion ( 10 , 2 , 2 ) ; cancelForVersion ( 10 , 2 , 3 ) ; cancelForVersion ( 10 , 2 , 4 ) ; createProcedure ( "testStreamInOutWithName" , "(INOUT<sp>mblob<sp>MEDIUMBLOB)<sp>BEGIN<sp>SELECT<sp>1<sp>FROM<sp>DUAL<sp>WHERE<sp>1=0;\nEND" ) ; try ( java . sql . CallableStatement cstmt ... | org . junit . Assert . assertEquals ( il , ol ) |
testGetOrdinal ( ) { System . out . println ( "getOrdinal" ) ; fish . payara . nucleus . microprofile . config . source . SystemPropertyConfigSource instance = new fish . payara . nucleus . microprofile . config . source . SystemPropertyConfigSource ( true ) ; int expResult = 400 ; int result = instance . getOrdinal ( ... | org . junit . Assert . assertEquals ( expResult , result ) |
findAll ( ) { int initialCount = userRepository . findAll ( ) . size ( ) ; io . lavagna . service . Helper . createUser ( userRepository , "test" , ( ( io . lavagna . service . UserRepositoryTest . TEST_USER_NAME ) + "0" ) ) ; io . lavagna . service . Helper . createUser ( userRepository , "test" , ( ( io . lavagna . s... | org . junit . Assert . assertTrue ( ( ( userRepository . findAll ( ) . size ( ) ) == ( initialCount + 2 ) ) ) |
TestGetJobWorkingDir ( ) { org . apache . hadoop . fs . FileSystem fileSystem = org . apache . hadoop . fs . FileSystem . get ( new org . apache . hadoop . conf . Configuration ( ) ) ; org . apache . hadoop . fs . Path jobWorkDirPath = null ; org . apache . kylin . common . KylinConfig kylinConfig = mock ( org . apache... | org . junit . Assert . assertTrue ( fileSystem . exists ( jobWorkDirPath ) ) |
backwardsCompatible_withPublicIp ( ) { boolean usePrivateDnsName = false ; boolean connectUsingPublicIp = true ; boolean associatePublicIp = false ; "<AssertPlaceHolder>" ; } backwardsCompatible ( boolean , boolean , boolean ) { if ( usePrivateDnsName && ( ! connectUsingPublicIp ) ) { return hudson . plugins . ec2 . Co... | org . junit . Assert . assertThat ( hudson . plugins . ec2 . ConnectionStrategy . backwardsCompatible ( usePrivateDnsName , connectUsingPublicIp , associatePublicIp ) , org . hamcrest . CoreMatchers . equalTo ( ConnectionStrategy . PUBLIC_IP ) ) |
adapt ( ) { org . eclipse . collections . api . map . MutableMap < java . lang . Integer , java . lang . Integer > map = Maps . mutable . with ( 1 , 1 , 2 , 2 , 3 , 3 ) ; "<AssertPlaceHolder>" ; } adapt ( java . util . Map ) { return map instanceof org . eclipse . collections . api . map . MutableMap < ? , ? > ? ( ( or... | org . junit . Assert . assertEquals ( org . eclipse . collections . impl . map . mutable . MapAdapter . adapt ( new java . util . HashMap ( map ) ) , org . eclipse . collections . impl . factory . Maps . adapt ( new java . util . HashMap ( map ) ) ) |
shouldReturnLastDayOfYear ( ) { final java . util . Date testDate = new java . util . GregorianCalendar ( 2019 , java . util . Calendar . JULY , 17 ) . getTime ( ) ; final java . util . Date result = com . autentia . tnt . util . DateUtils . getLastDayOfYear ( testDate ) ; java . util . Date expectedDate = new java . u... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( expectedDate ) ) |
givenLocalHost_whenReturnsNetworkInterface_thenCorrect ( ) { com . baeldung . networking . interfaces . NetworkInterface nif = com . baeldung . networking . interfaces . NetworkInterface . getByInetAddress ( com . baeldung . networking . interfaces . InetAddress . getLocalHost ( ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( nif ) |
testExecuteNonNullPlainTextValue ( ) { final java . lang . String plainTextValue = "protect" ; final ddf . security . encryption . impl . EncryptionServiceImpl encryptionService = new ddf . security . encryption . impl . EncryptionServiceImpl ( ) ; final ddf . security . command . EncryptCommand encryptCommand = new dd... | org . junit . Assert . assertNull ( encryptedValue ) |
testAlertRoundtrip ( ) { com . urbanairship . api . push . model . notification . adm . ADMDevicePayload override = com . urbanairship . api . push . model . notification . adm . ADMDevicePayload . newBuilder ( ) . setAlert ( "Some<sp>Title" ) . build ( ) ; java . lang . String json = com . urbanairship . api . push . ... | org . junit . Assert . assertEquals ( override , override2 ) |
testSpecific ( ) { org . apache . avro . generic . GenericRecord savedRecord = new org . apache . avro . generic . GenericData . Record ( org . apache . crunch . test . Person . SCHEMA$ ) ; savedRecord . put ( "name" , "John<sp>Doe" ) ; savedRecord . put ( "age" , 42 ) ; savedRecord . put ( "siblingnames" , com . googl... | org . junit . Assert . assertEquals ( com . google . common . collect . Lists . newArrayList ( expectedPerson ) , com . google . common . collect . Lists . newArrayList ( personList ) ) |
testCodeRequiresSLI_SCMatches_SLIFalse ( ) { java . lang . String serviceCode = "service001" ; org . oscarehr . common . model . BillingService billingService = new org . oscarehr . common . model . BillingService ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( billin... | org . junit . Assert . assertFalse ( dao . codeRequiresSLI ( serviceCode ) ) |
testContainsNullOrEmpty ( ) { org . apache . commons . functor . range . CharacterRange range = org . apache . commons . functor . range . Ranges . characterRange ( 'a' , BoundType . OPEN , 'r' , BoundType . CLOSED , 1 ) ; "<AssertPlaceHolder>" ; } contains ( T extends org . apache . commons . functor . range . Number ... | org . junit . Assert . assertFalse ( range . contains ( null ) ) |
testReportErrorOnWrongDateEffective ( ) { java . lang . String drl = "rule<sp>X<sp>date-effective<sp>\"9-asbrdfh-1974\"<sp>when\n" + ( ( "<sp>$s<sp>:<sp>String()<sp>" + "then\n" ) + "end\n" ) ; org . kie . internal . builder . KnowledgeBuilder kb = org . kie . internal . builder . KnowledgeBuilderFactory . newKnowledge... | org . junit . Assert . assertTrue ( kb . hasErrors ( ) ) |
testArrayRanges ( ) { int exceptionsCaught = 0 ; try { int arrayLen = 0 ; gov . sandia . cognition . util . DoubleReuseRandom rand = new gov . sandia . cognition . util . DoubleReuseRandom ( arrayLen ) ; } catch ( java . lang . Exception e ) { exceptionsCaught ++ ; } try { int arrayLen = 0 ; gov . sandia . cognition . ... | org . junit . Assert . assertEquals ( 2 , exceptionsCaught ) |
testNoMatch02 ( ) { boolean matchResult = namespacePatternMatcher . matchesEndToEnd ( "$a" ) ; "<AssertPlaceHolder>" ; } matchesEndToEnd ( java . lang . String ) { return pattern . matcher ( input ) . matches ( ) ; } | org . junit . Assert . assertFalse ( matchResult ) |
shouldCreateDecimalFromLongValue ( ) { "<AssertPlaceHolder>" ; } create ( java . lang . Iterable ) { final java . util . List < org . modeshape . jcr . spi . index . IndexWriter > writers = new java . util . ArrayList ( ) ; for ( org . modeshape . jcr . spi . index . provider . IndexProvider provider : providers ) { if... | org . junit . Assert . assertThat ( factory . create ( 1L ) , org . hamcrest . core . Is . is ( java . math . BigDecimal . valueOf ( 1L ) ) ) |
maakBerichtenAfnemerIndicatie_Plaatsing ( ) { final nl . bzk . brp . domain . algemeen . Autorisatiebundel autorisatiebundel = nl . bzk . brp . domain . algemeen . TestAutorisaties . maakAutorisatiebundel ( SoortDienst . SELECTIE ) ; autorisatiebundel . getDienst ( ) . setSoortSelectie ( SoortSelectie . SELECTIE_MET_PL... | org . junit . Assert . assertEquals ( 1 , berichten . size ( ) ) |
shouldProcessNextInterceptorInTheQueue ( ) { final uk . gov . justice . services . core . interceptor . InterceptorContext interceptorContext = mock ( uk . gov . justice . services . core . interceptor . InterceptorContext . class ) ; final uk . gov . justice . services . core . interceptor . InterceptorContext result ... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( interceptorContext ) ) |
file_size ( ) { final int COUNT = com . groupon . lex . metrics . history . xdr . TSDataFileChainTest . LARGE_COUNT ; fill_ ( COUNT ) ; fd . waitPendingTasks ( ) ; final long expected = java . nio . file . Files . list ( tmpdir ) . mapToLong ( ( path ) -> { try { return java . nio . file . Files . size ( path ) ; } cat... | org . junit . Assert . assertEquals ( expected , fd . getFileSize ( ) ) |
testCheckMutateRow ( ) { com . google . cloud . bigtable . data . v2 . models . Mutation mutation = com . google . cloud . bigtable . data . v2 . models . Mutation . create ( ) ; mutation . setCell ( "family" , "qualifier" , "some<sp>other<sp>value" ) ; com . google . cloud . bigtable . data . v2 . models . Conditional... | org . junit . Assert . assertTrue ( actual ) |
testMessageSetGetString ( ) { final quickfix . Message message = new quickfix . Message ( ) ; try { message . getString ( 5 ) ; org . junit . Assert . fail ( "exception<sp>not<sp>thrown" ) ; } catch ( final quickfix . FieldNotFound e ) { } message . setString ( 5 , "string5" ) ; try { "<AssertPlaceHolder>" ; } catch ( ... | org . junit . Assert . assertEquals ( "string5" , message . getString ( 5 ) ) |
testCloneWithDefaultOperator ( ) { org . springframework . data . solr . core . query . Query source = new org . springframework . data . solr . core . query . SimpleQuery ( new org . springframework . data . solr . core . query . Criteria ( "field_1" ) . is ( "value_1" ) ) ; source . setDefaultOperator ( Operator . OR... | org . junit . Assert . assertEquals ( source . getDefaultOperator ( ) , destination . getDefaultOperator ( ) ) |
getDrugsByMapping_shouldReturnEmptyListIfNoMatchesAreFound ( ) { executeDataSet ( org . openmrs . api . ConceptServiceTest . GET_DRUG_MAPPINGS ) ; java . util . List < org . openmrs . ConceptMapType > conceptMapTypeList = conceptService . getConceptMapTypes ( false , true ) ; java . util . List < org . openmrs . Drug >... | org . junit . Assert . assertTrue ( drugs . isEmpty ( ) ) |
getShortShouldWorkBigEndianIndex0 ( ) { java . nio . ByteBuffer buf = java . nio . ByteBuffer . allocate ( 4 ) ; buf . order ( org . kaazing . gateway . util . BIG_ENDIAN ) ; buf . putShort ( ( ( short ) ( 12345 ) ) ) ; buf . flip ( ) ; short result = org . kaazing . gateway . util . Utils . getShort ( buf , 0 ) ; shor... | org . junit . Assert . assertEquals ( expected , result ) |
textNonTxn_graph_union_graph ( ) { org . apache . jena . query . text . Dataset ds = create ( ) ; org . apache . jena . query . text . TestTextNonTxn . data ( ds , "(<ex:g1><sp><s1><sp>rdfs:label<sp>'foo')" , "(<ex:g1><sp><s2><sp>rdfs:label<sp>'apple')" , "(<ex:g2><sp><s3><sp>rdfs:label<sp>'food')" ) ; java . lang . St... | org . junit . Assert . assertEquals ( 2 , x . size ( ) ) |
testConversionWithUnknownTargetFormatFuture ( ) { java . io . File target = makeTarget ( false ) ; com . documents4j . api . IFileConsumer fileConsumer = mock ( com . documents4j . api . IFileConsumer . class ) ; try { getConverter ( ) . convert ( validFile ( true ) ) . as ( validInputType ( ) ) . to ( target , fileCon... | org . junit . Assert . assertFalse ( target . exists ( ) ) |
createWithKeys ( ) { java . util . Set < com . basho . riak . hadoop . BucketKey > keys = new java . util . HashSet < com . basho . riak . hadoop . BucketKey > ( java . util . Arrays . asList ( new com . basho . riak . hadoop . BucketKey ( com . basho . riak . hadoop . keylisters . KeysKeyListerTest . BUCKET_NAME , "k1... | org . junit . Assert . assertEquals ( keys , lister . getKeys ( null ) ) |
testSize ( ) { edu . jhu . pacaya . util . semiring . Algebra s = edu . jhu . pacaya . util . semiring . RealAlgebra . getInstance ( ) ; edu . jhu . pacaya . gm . model . VarTensor [ ] fsArr = new edu . jhu . pacaya . gm . model . VarTensor [ 2 ] ; fsArr [ 0 ] = new edu . jhu . pacaya . gm . model . VarTensor ( s , new... | org . junit . Assert . assertEquals ( 5 , fs . size ( ) ) |
testWord_throwsForNullValue ( ) { org . jparsec . Parser < ? > tokenizer = Terminals . CharLiteral . SINGLE_QUOTE_TOKENIZER ; org . jparsec . Lexicon lexicon = new org . jparsec . Lexicon ( ( __ ) -> null , tokenizer ) ; "<AssertPlaceHolder>" ; try { lexicon . word ( "whatever" ) ; org . junit . Assert . fail ( ) ; } c... | org . junit . Assert . assertSame ( tokenizer , lexicon . tokenizer ) |
strict_wip_with_pending_scenarios ( ) { createStrictWipRuntime ( ) ; bus . send ( testCaseFinishedWithStatus ( Result . Type . PENDING ) ) ; "<AssertPlaceHolder>" ; } exitStatus ( ) { if ( results . isEmpty ( ) ) { return cucumber . runtime . ExitStatus . DEFAULT ; } if ( runtimeOptions . isWip ( ) ) { return min ( res... | org . junit . Assert . assertEquals ( 0 , exitStatus . exitStatus ( ) ) |
testParseMarkersFormat ( ) { java . lang . String testString = "{\"message\":\"Failed<sp>to<sp>parse<sp>REST<sp>response.\",\"success\":true,\"responseCode\":-1,\"object\":[{\"lineNumber\":\"-1\",\"parameter\":\"new\",\"filePath\":null,\"defectUrl\":null,\"genericVulnId\":\"79\",\"genericVulnName\":\"Improper<sp>Neutra... | org . junit . Assert . assertTrue ( ( ( endpoints . object ) != null ) ) |
testGenerateReplaceColumnsStatement ( ) { org . finra . herd . model . api . xml . BusinessObjectFormatDdlRequest businessObjectFormatDdlRequest = new org . finra . herd . model . api . xml . BusinessObjectFormatDdlRequest ( ) ; businessObjectFormatDdlRequest . setTableName ( org . finra . herd . service . helper . TAB... | org . junit . Assert . assertEquals ( "struct<s:string,f:float,m:map<double,array<bigint>>>" 2 , expected , actual ) |
superEventhandling ( ) { com . voxelplugineering . voxelsniper . service . eventbus . EventBus bus = new com . voxelplugineering . voxelsniper . service . eventbus . AsyncEventBus ( com . voxelplugineering . voxelsniper . util . ContextTestUtil . create ( new com . voxelplugineering . voxelsniper . service . config . C... | org . junit . Assert . assertEquals ( 3 , handler . count ) |
testLongArrayWithIndex ( ) { java . lang . Long [ ] longArr = new java . lang . Long [ 4 ] ; longArr [ 0 ] = 1L ; longArr [ 1 ] = 2L ; longArr [ 2 ] = 4L ; longArr [ 3 ] = 5L ; com . salesforce . phoenix . schema . PhoenixArray arr = com . salesforce . phoenix . schema . PArrayDataType . instantiatePhoenixArray ( PData... | org . junit . Assert . assertEquals ( 4L , result ) |
testGetNameWithoutEscapedColumnName ( ) { java . lang . String expected = "column" ; org . deegree . commons . jdbc . SQLIdentifier actual = new org . deegree . commons . jdbc . SQLIdentifier ( expected ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( expected , actual . getName ( ) ) |
testGraphQueryVertexHasWithSecurityComplexFormula ( ) { graph . prepareVertex ( "v1" , org . vertexium . test . GraphTestBase . VISIBILITY_MIXED_CASE_a ) . setProperty ( "age" , 25 , org . vertexium . test . GraphTestBase . VISIBILITY_MIXED_CASE_a ) . save ( AUTHORIZATIONS_ALL ) ; graph . prepareVertex ( "v2" , org . v... | org . junit . Assert . assertEquals ( 1 , count ( vertices ) ) |
test ( ) { net . seninp . jmotif . sax . discord . DiscordRecords discordsHash = null ; net . seninp . jmotif . sax . discord . DiscordRecords discordsOle = null ; try { discordsHash = net . seninp . jmotif . sax . discord . HOTSAXImplementation . series2Discords ( series , net . seninp . jmotif . sax . discord . TestD... | org . junit . Assert . assertEquals ( d2 , d3 ) |
validate_shouldBeValidIfIdentifierIsNotSet ( ) { provider . setIdentifier ( null ) ; org . openmrs . Person person = new org . openmrs . Person ( ) ; java . util . Set < org . openmrs . PersonName > personNames = new java . util . HashSet ( 1 ) ; org . openmrs . PersonName personName = new org . openmrs . PersonName ( ... | org . junit . Assert . assertFalse ( errors . hasErrors ( ) ) |
evaluatesToFalseMatch ( ) { org . springframework . ws . test . support . matcher . XPathExpectationsHelper helper = new org . springframework . ws . test . support . matcher . XPathExpectationsHelper ( "//b!=1" ) ; org . springframework . ws . test . support . matcher . WebServiceMessageMatcher matcher = helper . eval... | org . junit . Assert . assertNotNull ( matcher ) |
testSimpleNode ( ) { org . apache . jackrabbit . oak . spi . state . NodeState before = org . apache . jackrabbit . oak . plugins . segment . EMPTY_NODE . builder ( ) . setProperty ( "foo" , "abc" ) . setProperty ( "bar" , 123 ) . setProperty ( "baz" , Math . PI ) . getNodeState ( ) ; org . apache . jackrabbit . oak . ... | org . junit . Assert . assertEquals ( before , after ) |
givenStaticFieldAndUsingOfTypeAndName ( ) { org . awaitility . FakeRepositoryWithStaticFieldAndAnnotation repository = new org . awaitility . FakeRepositoryWithStaticFieldAndAnnotation ( ) ; new org . awaitility . Asynch ( repository ) . perform ( ) ; org . awaitility . Awaitility . await ( ) . until ( org . awaitility... | org . junit . Assert . assertEquals ( 1 , repository . getValue ( ) ) |
test ( ) { try { org . zkoss . zats . mimic . DesktopAgent desktop = connect ( ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } connect ( ) { return connect ( "" ) ; } | org . junit . Assert . assertTrue ( true ) |
testIsLdh ( ) { boolean result = org . restfulwhois . rdap . common . util . DomainUtil . isLdh ( "ns.ddomain.cn" ) ; "<AssertPlaceHolder>" ; } isLdh ( java . lang . String ) { if ( org . apache . commons . lang . StringUtils . isBlank ( domain ) ) { return false ; } java . lang . String domainWithoutLastPoint = org . ... | org . junit . Assert . assertEquals ( true , result ) |
testGetUsers ( ) { java . util . List < java . lang . String > openIds = wechat . user ( ) . getUsers ( "" ) . getData ( ) . getOpenId ( ) ; "<AssertPlaceHolder>" ; System . out . println ( openIds ) ; } getOpenId ( ) { return openId ; } | org . junit . Assert . assertNotNull ( openIds ) |
parseDateFromFileName_invalidInput ( ) { java . lang . String invalidTimeString = "N1_hms_logs_2015-03-03_00" ; java . util . Date currentDate = debuggerUtil . parseDateFromFileName ( invalidTimeString ) ; "<AssertPlaceHolder>" ; } parseDateFromFileName ( java . lang . String ) { if ( ( isParameterNotNullNonEmpty ( log... | org . junit . Assert . assertNotNull ( currentDate ) |
writeNormal ( ) { org . apache . poi . poifs . filesystem . POIFSFileSystem fs = new org . apache . poi . poifs . filesystem . POIFSFileSystem ( org . apache . poi . hslf . record . TestCurrentUserAtom . _slTests . getFile ( org . apache . poi . hslf . record . TestCurrentUserAtom . normalFile ) ) ; org . apache . poi ... | org . junit . Assert . assertArrayEquals ( contents , out ) |
testSerialization ( ) { org . jfree . chart . entity . PieSectionEntity e1 = new org . jfree . chart . entity . PieSectionEntity ( new java . awt . geom . Rectangle2D . Double ( 1.0 , 2.0 , 3.0 , 4.0 ) , new org . jfree . data . general . DefaultPieDataset ( ) , 1 , 2 , "Key" , "ToolTip" , "URL" ) ; org . jfree . chart... | org . junit . Assert . assertEquals ( e1 , e2 ) |
testSingleNodeWithArg ( ) { org . antlr . runtime . tree . TreeWizard wiz = new org . antlr . runtime . tree . TreeWizard ( org . antlr . test . TestTreeWizard . adaptor , org . antlr . test . TestTreeWizard . tokens ) ; org . antlr . runtime . tree . CommonTree t = ( ( org . antlr . runtime . tree . CommonTree ) ( wiz... | org . junit . Assert . assertEquals ( expecting , found ) |
testRemoveTree ( ) { org . apache . jackrabbit . oak . api . Root testRoot = testSession . getLatestRoot ( ) ; java . util . List < java . lang . String > paths = com . google . common . collect . ImmutableList . of ( "/a/d/b/e/c" , "/a/d/b" , "/a" ) ; for ( java . lang . String p : paths ) { try { testRoot . getTree (... | org . junit . Assert . assertTrue ( e . isAccessViolation ( ) ) |
calendarUtils_toCalendar_dateReturned ( ) { java . util . Calendar expResult = java . util . Calendar . getInstance ( ) ; java . util . Date d = expResult . getTime ( ) ; java . util . Calendar result = dk . i2m . converge . core . utils . CalendarUtils . toCalendar ( d ) ; "<AssertPlaceHolder>" ; } toCalendar ( java .... | org . junit . Assert . assertEquals ( expResult , result ) |
check_db_and_jars_with_same_minor_version_is_accepted ( ) { given_DB_Jar_Home_Versions ( "6.1.0" , "6.1.1" ) ; java . lang . Boolean sameVersion = checkPlatformVersion . call ( ) ; "<AssertPlaceHolder>" ; } call ( ) { try { org . bonitasoft . engine . commons . JavaMethodInvoker jmi = new org . bonitasoft . engine . co... | org . junit . Assert . assertTrue ( sameVersion ) |
testSection33PublishedFractionalSecond ( ) { org . apache . abdera . i18n . iri . IRI uri = org . apache . abdera . test . parser . stax . FeedValidatorTest . baseURI . resolve ( "3.3/published_fractional_second.xml" ) ; org . apache . abdera . model . Document < org . apache . abdera . model . Feed > doc = parse ( uri... | org . junit . Assert . assertNotNull ( feed ) |
testOnErrorRunnableIsCalled ( ) { java . lang . RuntimeException throwable = new java . lang . RuntimeException ( ) ; final java . util . concurrent . atomic . AtomicBoolean onErrorWasCalled = new java . util . concurrent . atomic . AtomicBoolean ( ) ; org . apache . beam . sdk . fn . test . TestStreams . withOnNext ( ... | org . junit . Assert . assertTrue ( onErrorWasCalled . get ( ) ) |
throwable_LBCLASSIC_155_I ( ) { jee . setExpression ( "throwable<sp>instanceof<sp>java.io.IOException" ) ; jee . start ( ) ; ch . qos . logback . classic . spi . LoggingEvent event = makeLoggingEvent ( new java . io . IOException ( "" ) ) ; "<AssertPlaceHolder>" ; } evaluate ( ch . qos . logback . access . spi . IAcces... | org . junit . Assert . assertTrue ( jee . evaluate ( event ) ) |
testBuild ( ) { org . lnu . is . domain . department . Department context = new org . lnu . is . domain . department . Department ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>Department<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagina... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testLongCountPredicate ( ) { final long count = net . hydromatic . linq4j . test . Linq4j . asEnumerable ( net . hydromatic . linq4j . test . Linq4jTest . depts ) . longCount ( new net . hydromatic . linq4j . test . Predicate1 < net . hydromatic . linq4j . test . Linq4jTest . Department > ( ) { public boolean apply ( n... | org . junit . Assert . assertEquals ( 2 , count ) |
testRemovePut ( ) { map2 . remove ( 1 , null , ( ( byte ) ( 2 ) ) , 1399459457425L ) ; waitTillFinished0 ( ) ; map1 . put ( 1 , 1 , ( ( byte ) ( 1 ) ) , 1399459457425L ) ; waitTillEqual ( 5000 ) ; "<AssertPlaceHolder>" ; } waitTillEqual ( int ) { int t = 0 ; for ( ; t < timeOutMs ; t ++ ) { if ( map1 . equals ( map2 ) ... | org . junit . Assert . assertEquals ( map1 , map2 ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.