input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testEnsureSpaceForKey ( ) { org . apache . hadoop . hbase . io . encoding . BufferedDataBlockEncoder . SeekerState state = new org . apache . hadoop . hbase . io . encoding . BufferedDataBlockEncoder . SeekerState ( ) ; for ( int i = 1 ; i <= 65536 ; ++ i ) { state . keyLength = i ; state . ensureSpaceForKey ( ) ; stat... | org . junit . Assert . assertEquals ( ( ( byte ) ( j % 255 ) ) , state . keyBuffer [ j ] ) |
decodeNasPortTest ( ) { byte [ ] b = new byte [ ] { 5 , 6 , 0 , 0 , 0 , 0 } ; org . krakenapps . radius . protocol . NasPortAttribute attr = new org . krakenapps . radius . protocol . NasPortAttribute ( b , 0 , b . length ) ; "<AssertPlaceHolder>" ; } getPort ( ) { return port ; } | org . junit . Assert . assertEquals ( 0 , attr . getPort ( ) ) |
testEmptyArrayCreation ( ) { final java . lang . String [ ] array = org . fintx . util . Arrays . < java . lang . String > toArray ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 0 , array . length ) |
remoteServerListFirstTest ( ) { int serverCount = 10 ; final java . lang . String lbId = java . lang . Thread . currentThread ( ) . getStackTrace ( ) [ 1 ] . getMethodName ( ) ; final java . lang . String backupFileName = ( ( "/opt/data/" + ( managerId ) ) + "." ) + lbId ; final com . ctrip . soa . caravan . ribbon . L... | org . junit . Assert . assertTrue ( ( index >= serverCount ) ) |
testSaveFail ( ) { avrobase . AvroBase < bagcheck . User , byte [ ] > userHAB = avrobase . AvroBaseFactory . createAvroBase ( new havrobase . HABTest . HABModule ( ) , havrobase . HAB . class , AvroFormat . BINARY ) ; bagcheck . User saved = new bagcheck . User ( ) ; saved . firstName = $ ( "Sam" ) ; saved . lastName =... | org . junit . Assert . assertFalse ( userHAB . put ( row , saved , ( - 1 ) ) ) |
insertWeakRefIntoMapTest ( ) { javafx . scene . control . Label label = new javafx . scene . control . Label ( "Label" ) ; de . saxsys . leakscanner . WeakRef < javafx . scene . Node > labelRef = new de . saxsys . leakscanner . WeakRef < javafx . scene . Node > ( label ) ; javafx . scene . control . TreeItem < de . sax... | org . junit . Assert . assertEquals ( labelRef , returned . getValue ( ) ) |
testInvalidToken ( ) { org . talend . esb . test . oidc . OidcAccessTokenValidatorTest . ContainerRequestContextTest ctx = new org . talend . esb . test . oidc . OidcAccessTokenValidatorTest . ContainerRequestContextTest ( ) ; setAuthzHeader ( "Bearer<sp>invalid_token_234" ) ; try { org . talend . esb . test . oidc . O... | org . junit . Assert . assertTrue ( ctx . isAborted ( ) ) |
checkGetClipBoundsWhenClipIsNull ( ) { this . g2 . setClip ( null ) ; "<AssertPlaceHolder>" ; } getClipBounds ( ) { if ( ( this . clip ) == null ) { return null ; } return getClip ( ) . getBounds ( ) ; } | org . junit . Assert . assertNull ( this . g2 . getClipBounds ( ) ) |
correctResult ( ) { "<AssertPlaceHolder>" ; } correctResult ( ) { org . junit . Assert . assertFalse ( com . miracle . test . webmvc . util . BindingResultBuilder . correctResult ( ) . hasErrors ( ) ) ; } | org . junit . Assert . assertFalse ( com . miracle . test . webmvc . util . BindingResultBuilder . correctResult ( ) . hasErrors ( ) ) |
write_ROI ( ) { if ( ! ( isJp2KakDriverAvailable ) ) return ; it . geosolutions . imageio . plugins . jp2kakadu . JP2KWriteTest . LOGGER . info ( "Testing<sp>JP2<sp>Write<sp>operation<sp>with<sp>ROI<sp>option<sp>setting" ) ; final java . io . File inputFile = it . geosolutions . resources . TestData . file ( this , it ... | org . junit . Assert . assertTrue ( inputFile . exists ( ) ) |
getTokenValidSecs ( ) { long newTokenValidSecs = 5000L ; com . microsoft . azure . sdk . iot . device . auth . IotHubSasTokenAuthenticationProvider sasAuth = new tests . unit . com . microsoft . azure . sdk . iot . device . auth . IotHubSasTokenAuthenticationProviderTest . mockIotHubSasTokenAuthenticationImplementation... | org . junit . Assert . assertEquals ( newTokenValidSecs , actualTokenValidSecs ) |
testRequestConfiguration ( ) { org . jinstagram . realtime . InstagramSubscription fixture = new org . jinstagram . realtime . InstagramSubscription ( ) ; org . jinstagram . InstagramConfig config = new org . jinstagram . InstagramConfig ( ) ; org . jinstagram . realtime . InstagramSubscription result = fixture . reque... | org . junit . Assert . assertNotNull ( result ) |
computeFactor_WholeBillingPeriodForWeek2 ( ) { long startTimeUsage = org . oscm . test . DateTimeHandling . calculateMillis ( "2012-02-01<sp>00:00:00" ) ; long endTimeUsage = org . oscm . test . DateTimeHandling . calculateMillis ( "2012-02-29<sp>23:59:59" ) ; org . oscm . billingservice . service . model . BillingInpu... | org . junit . Assert . assertEquals ( 4 , factor , 0 ) |
testDeterminizeFstNonFunctional ( ) { com . github . steveash . jopenfst . MutableFst fstA = com . github . steveash . jopenfst . io . Convert . importFst ( "data/tests/algorithms/determinizeFstNonFunctional/A" , TropicalSemiring . INSTANCE ) ; com . github . steveash . jopenfst . MutableFst determinized = com . github... | org . junit . Assert . assertTrue ( determinized . equals ( fstDeterminized ) ) |
cantGoToLastPosIfDisabled ( ) { navTextView1 . caretPosition ( ) . set ( 2 ) ; right ( ) ; "<AssertPlaceHolder>" ; } caretPosition ( ) { return getProp ( jetbrains . jetpad . projectional . view . TextView . CARET_POSITION ) ; } | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 2 ) ) , navTextView1 . caretPosition ( ) . get ( ) ) |
givenProgrammaticallyManagedServer_whenUsingSimpleStubbing_thenCorrect ( ) { wireMockServer . start ( ) ; configureFor ( "localhost" , 8080 ) ; stubFor ( get ( urlEqualTo ( com . baeldung . rest . wiremock . introduction . ProgrammaticallyManagedLiveTest . BAELDUNG_PATH ) ) . willReturn ( aResponse ( ) . withBody ( "We... | org . junit . Assert . assertEquals ( "Welcome<sp>to<sp>Baeldung!" , stringResponse ) |
testDelete ( ) { datastore . put ( testEntity ) ; datastore . delete ( taskKey ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNull ( datastore . get ( taskKey ) ) |
testGetQualifiedName1 ( ) { org . dresdenocl . pivotmodel . PrimitiveType type ; java . lang . String msg ; msg = "The<sp>adaptation<sp>of<sp>PrimitiveType.getQualifiedName()<sp>seems<sp>to<sp>be<sp>wrong." ; for ( java . lang . String aTypesName : org . dresdenocl . metamodels . test . tests . TestPrimitiveType . allP... | org . junit . Assert . assertNotNull ( msg , type . getQualifiedName ( ) ) |
changesShouldBeRestored ( ) { presenter . revertChanges ( ) ; verify ( preferencesManager , times ( 2 ) ) . getValue ( org . eclipse . che . ide . ext . git . client . preference . CommitterPreferencePresenterTest . COMMITTER_NAME ) ; verify ( preferencesManager , times ( 2 ) ) . getValue ( org . eclipse . che . ide . ... | org . junit . Assert . assertFalse ( presenter . isDirty ( ) ) |
whenFlowableIsCreatedFromFlowableOnSubscribe_thenItIsProperlyInitialized ( ) { io . reactivex . FlowableOnSubscribe < java . lang . Integer > flowableOnSubscribe = ( flowableEmitter ) -> flowableEmitter . onNext ( 1 ) ; io . reactivex . Flowable < java . lang . Integer > integerFlowable = io . reactivex . Flowable . cr... | org . junit . Assert . assertNotNull ( integerFlowable ) |
testFromEpochToZuluDate_withSetTimeZone ( ) { java . lang . String epochTest = "1377174053" ; java . lang . String expected = "2013-08-22T14:20:53Z" ; subject . setEpochTimeZone ( "+0200" ) ; setupStage ( ) ; com . findwise . hydra . local . LocalDocument ld = new com . findwise . hydra . local . LocalDocument ( ) ; ld... | org . junit . Assert . assertEquals ( expected , ld . getContentField ( "date" ) ) |
shouldMutateASingleVariableSolutionReturnTheSameSolutionIfItIsNotMutated ( ) { @ org . uma . jmetal . operator . impl . mutation . SuppressWarnings ( "unchecked" ) org . uma . jmetal . util . pseudorandom . RandomGenerator < java . lang . Double > randomGenerator = mock ( org . uma . jmetal . util . pseudorandom . Rand... | org . junit . Assert . assertEquals ( oldSolution , solution ) |
count ( ) { int count = com . gs . collections . impl . utility . StringIterate . count ( "1a2a3" , com . gs . collections . impl . block . factory . primitive . CharPredicates . isDigit ( ) ) ; "<AssertPlaceHolder>" ; } isDigit ( ) { com . gs . collections . impl . block . factory . primitive . CharPredicateTest . ass... | org . junit . Assert . assertEquals ( 3 , count ) |
testFreeSelectSqlBuilderInAllDBAndTableShardBy ( ) { com . ctrip . platform . dal . dao . shard . List < java . lang . String > list = new com . ctrip . platform . dal . dao . shard . ArrayList ( ) ; list . add ( "1" ) ; list . add ( "2" ) ; list . add ( "3" ) ; list . add ( "4" ) ; com . ctrip . platform . dal . dao .... | org . junit . Assert . assertEquals ( 6 , result . size ( ) ) |
toString_ ( ) { charset = new com . alibaba . citrus . util . i18n . LocaleInfo . UnknownCharset ( "test" ) ; "<AssertPlaceHolder>" ; } name ( ) { charset = new com . alibaba . citrus . util . i18n . LocaleInfo . UnknownCharset ( "test" ) ; org . junit . Assert . assertEquals ( "test" , charset . name ( ) ) ; } | org . junit . Assert . assertEquals ( "test" , charset . name ( ) ) |
shouldReturnFalseWhenClassNotPresent ( ) { java . lang . String className = "aoamwogmAWEGAWEg.asdmgm" ; boolean isPresent = com . navercorp . volleyextensions . volleyer . util . ClassUtils . isPresent ( className ) ; "<AssertPlaceHolder>" ; } isPresent ( java . lang . String ) { if ( com . navercorp . volleyextensions... | org . junit . Assert . assertThat ( isPresent , org . hamcrest . CoreMatchers . is ( false ) ) |
testIO ( ) { ivory . bloomir . data . BloomFilterHash bloom = new ivory . bloomir . data . BloomFilterHash ( ( ( ivory . bloomir . data . BloomFilterHashTest . members . length ) * 16 ) , 3 ) ; for ( int i : ivory . bloomir . data . BloomFilterHashTest . members ) { bloom . add ( i ) ; } java . io . ByteArrayOutputStre... | org . junit . Assert . assertEquals ( bloom , bloomCopy ) |
testIsEnabled ( ) { classUnderTest . setEnabled ( true ) ; "<AssertPlaceHolder>" ; } isEnabled ( ) { return enabled ; } | org . junit . Assert . assertEquals ( true , classUnderTest . isEnabled ( ) ) |
var_2 ( ) { final org . erlide . util . erlang . OtpPatternVariable r = ( ( org . erlide . util . erlang . OtpPatternVariable ) ( termParser . parse ( "_" ) ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return fName ; } | org . junit . Assert . assertEquals ( r . getName ( ) , "_" ) |
testReplication ( ) { final org . apache . hadoop . fs . Path testDir = new org . apache . hadoop . fs . Path ( "/ec" ) ; fs . mkdir ( testDir , org . apache . hadoop . fs . permission . FsPermission . getDirDefault ( ) ) ; fs . setErasureCodingPolicy ( testDir , ecPolicy . getName ( ) ) ; final org . apache . hadoop .... | org . junit . Assert . assertEquals ( policy , fs . getErasureCodingPolicy ( fooFile ) ) |
createDoubleDistinct ( ) { org . eclipse . tracecompass . segmentstore . core . ISegmentStore < org . eclipse . tracecompass . segmentstore . core . @ org . eclipse . jdt . annotation . NonNull ISegment > fixture = org . eclipse . tracecompass . segmentstore . core . SegmentStoreFactory . createSegmentStore ( SegmentSt... | org . junit . Assert . assertNotNull ( fixture ) |
testEvaluateTwoIndexTwoVarOrder1 ( ) { final java . lang . String indexSparqlString = "" + ( ( ( ( "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 0 + "{" ) + "<sp>?e<sp>a<sp>?c<sp>.<sp>" ) + "<sp>?e<sp><http://www.w3.org/2000/01/rdf-schema#label><sp>?l<sp>" ) + "}" ) ; final java . lang . String indexSparqlString2 = "" + ( (... | org . junit . Assert . assertEquals ( false , ipv . isValid ( tup ) ) |
testCreateThumbnailCollections_nullRename ( ) { java . util . List < java . io . File > files = java . util . Arrays . asList ( new java . io . File ( "test-resources/Thumbnailator/grid.jpg" ) , new java . io . File ( "test-resources/Thumbnailator/grid.png" ) , new java . io . File ( "test-resources/Thumbnailator/grid.... | org . junit . Assert . assertEquals ( "Rename<sp>is<sp>null." , e . getMessage ( ) ) |
test ( ) { hudson . model . AbstractProject p = ( ( hudson . model . AbstractProject ) ( r . jenkins . getItem ( "old" ) ) ) ; hudson . plugins . parameterizedtrigger . BuildTrigger trigger = ( ( hudson . plugins . parameterizedtrigger . BuildTrigger ) ( p . getPublishersList ( ) . get ( hudson . plugins . parameterize... | org . junit . Assert . assertEquals ( 2 , trigger . getConfigs ( ) . size ( ) ) |
testBesselJ ( ) { final double tol = 1.0E-15 ; for ( int i = 0 ; i < ( org . apache . commons . math3 . special . BesselJTest . BESSEL_J_REF . length ) ; i ++ ) { final double [ ] data = org . apache . commons . math3 . special . BesselJTest . BESSEL_J_REF [ i ] ; final double order = data [ 0 ] ; final double x = data... | org . junit . Assert . assertEquals ( msg , expected , actual , tol ) |
getConnectedDevicesTest ( ) { org . mockito . Mockito . when ( fileManager . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( getADBAttribute ( ) ) . thenReturn ( adbPath ) ; androidDebugBridge = org . powermock . api . mockito . PowerMockito . mock ( com ... | org . junit . Assert . assertTrue ( ( getDevices == devices ) ) |
testNoTaskIterable ( ) { assumeEnvironment ( Environment . APPSPOT , Environment . CAPEDWARF ) ; com . google . appengine . api . datastore . Transaction tx = com . google . appengine . api . datastore . DatastoreServiceFactory . getDatastoreService ( ) . beginTransaction ( ) ; final int beforeNumTasks = getDefaultQueu... | org . junit . Assert . assertEquals ( beforeNumTasks , getDefaultQueue ( ) . fetchStatistics ( ) . getNumTasks ( ) ) |
bandWithIntLiteral ( ) { it . geosolutions . jaiext . jiffle . parser . node . Band b = new it . geosolutions . jaiext . jiffle . parser . node . Band ( new it . geosolutions . jaiext . jiffle . parser . node . IntLiteral ( "1" ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( "Bucket{" + "count=" )... | org . junit . Assert . assertThat ( b . toString ( ) , org . hamcrest . CoreMatchers . is ( "1" ) ) |
testIssue100 ( ) { org . zoodb . jdo . ZooJdoProperties props = org . zoodb . test . testutil . TestTools . getProps ( ) ; props . setZooAutoCreateSchema ( true ) ; javax . jdo . PersistenceManager pm = org . zoodb . test . testutil . TestTools . openPM ( props ) ; final java . lang . String str = "abcdefghijklmnopqrst... | org . junit . Assert . assertTrue ( rslt . iterator ( ) . hasNext ( ) ) |
testSubscriptiontkeyHashCodeSameObj ( ) { org . oscm . reportingservice . dao . CustomerEventData data1 = new org . oscm . reportingservice . dao . CustomerEventData ( ) ; data1 . setSubscriptiontkey ( new java . math . BigDecimal ( subscriptiontkey1 ) ) ; org . oscm . reportingservice . dao . CustomerEventData data2 =... | org . junit . Assert . assertEquals ( data1 . hashCode ( ) , data2 . hashCode ( ) ) |
canCreateMigrationPlanFromNoTenantToTenant ( ) { org . camunda . bpm . engine . repository . ProcessDefinition sharedDefinition = testHelper . deployAndGetDefinition ( ProcessModels . ONE_TASK_PROCESS ) ; org . camunda . bpm . engine . repository . ProcessDefinition tenantDefinition = testHelper . deployForTenantAndGet... | org . junit . Assert . assertNotNull ( migrationPlan ) |
testMapActieInhoudFormeelFoutief ( ) { final nl . bzk . brp . model . basis . FormeelHistorisch record = new nl . bzk . brp . model . basis . FormeelHistorisch ( ) { @ nl . bzk . brp . levering . lo3 . mapper . Override public nl . bzk . brp . model . basis . FormeleHistorieModel getFormeleHistorie ( ) { throw new java... | org . junit . Assert . assertNull ( brpActieInhoud ) |
testAddGenericBinding ( ) { System . out . println ( "addGenericBinding" ) ; xades4j . utils . XadesProfileCore instance = new xades4j . utils . XadesProfileCore ( ) ; instance . addGenericBinding ( xades4j . utils . Action . class , xades4j . utils . ActionOfA . class , xades4j . utils . A . class ) ; xades4j . utils ... | org . junit . Assert . assertTrue ( ( ( c . action ) instanceof xades4j . utils . ActionOfA ) ) |
parseWithHostAndPortAndPathAndOneQueryParameter ( ) { final com . azure . common . implementation . http . UrlBuilder builder = com . azure . common . implementation . http . UrlBuilder . parse ( "www.bing.com:123/index.html?a=1" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . value ; } | org . junit . Assert . assertEquals ( "www.bing.com:123/index.html?a=1" , builder . toString ( ) ) |
testSetContentCreator ( ) { org . pentaho . platform . api . repository2 . unified . webservices . RepositoryFileDto mockRepositoryFileDto = mock ( org . pentaho . platform . api . repository2 . unified . webservices . RepositoryFileDto . class ) ; doNothing ( ) . when ( fileResource . fileService ) . doSetContentCreat... | org . junit . Assert . assertEquals ( mockOkResponse , testResponse ) |
withInequalityFilterForDocumentSnapshotCursor ( ) { doAnswer ( com . google . cloud . firestore . LocalFirestoreHelper . queryResponse ( ) ) . when ( firestoreMock ) . streamRequest ( runQuery . capture ( ) , streamObserverCapture . capture ( ) , org . mockito . Matchers . < com . google . api . gax . rpc . ServerStrea... | org . junit . Assert . assertEquals ( queryRequest , runQuery . getValue ( ) ) |
testCreateSelectTemplate ( ) { me . prettyprint . cassandra . service . template . ColumnFamilyTemplate < java . lang . String , java . lang . String > template = new me . prettyprint . cassandra . service . template . ThriftColumnFamilyTemplate < java . lang . String , java . lang . String > ( keyspace , "Standard1" ,... | org . junit . Assert . assertEquals ( "value1" , value ) |
createLocalStreamConnectionServer ( ) { final org . xnio . XnioWorker xnioWorker = org . xnio . nio . test . XnioWorkerTestCase . xnio . createWorker ( OptionMap . EMPTY ) ; java . lang . UnsupportedOperationException expected = null ; try { xnioWorker . createStreamConnectionServer ( new org . xnio . LocalSocketAddres... | org . junit . Assert . assertNotNull ( expected ) |
testCreateWithExceptionsNullEvalId ( ) { try { org . sagebionetworks . repo . model . AccessControlList acl = new org . sagebionetworks . repo . model . AccessControlList ( ) ; evaluationPermissionsManager . createAcl ( adminUserInfo , acl ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentExc... | org . junit . Assert . assertTrue ( true ) |
convertXmlToObjectFromFile ( ) { java . lang . ClassLoader classLoader = getClass ( ) . getClassLoader ( ) ; java . io . FileReader reader = new java . io . FileReader ( classLoader . getResource ( "data-file.xml" ) . getFile ( ) ) ; com . baeldung . pojo . Customer customer = ( ( com . baeldung . pojo . Customer ) ( x... | org . junit . Assert . assertNotNull ( customer ) |
shouldRemovePropertyWhenPropertyValueIsNull ( ) { final uk . gov . gchq . gaffer . store . StoreProperties props = createStoreProperties ( ) ; props . set ( "testKey" , null ) ; "<AssertPlaceHolder>" ; } get ( K ) { return multiMap . get ( key ) ; } | org . junit . Assert . assertNull ( props . get ( "testKey" ) ) |
getProductForCustomerOnly ( ) { java . util . List < org . oscm . domobjects . Product > result = runTX ( new java . util . concurrent . Callable < java . util . List < org . oscm . domobjects . Product > > ( ) { @ org . oscm . subscriptionservice . dao . Override public java . util . List < org . oscm . domobjects . P... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
parseOverlapsFilter ( ) { org . deegree . filter . Filter filter = parse ( "testfilter22.xml" ) ; "<AssertPlaceHolder>" ; } parse ( java . util . Map ) { java . lang . String procedure = getRequired ( prams , "PROCEDURE" ) ; java . lang . String format = prams . get ( "OUTPUTFORMAT" ) ; if ( format == null ) { format =... | org . junit . Assert . assertNotNull ( filter ) |
testSerializeMap ( ) { java . util . Map < java . lang . String , java . lang . String > map = com . google . common . collect . Maps . newHashMap ( ) ; map . put ( "key1" , "value1" ) ; map . put ( "key2" , "value2" ) ; java . lang . String mapStr = org . apache . kylin . common . util . JsonUtil . writeValueAsString ... | org . junit . Assert . assertEquals ( map , map2 ) |
parseWrongTimeZone ( ) { java . lang . String expires = "Mon,<sp>12<sp>May<sp>2008<sp>09:23:29<sp>PDT" ; "<AssertPlaceHolder>" ; } parseRfc1123Date ( java . lang . String ) { try { return org . apache . shindig . common . util . DateUtil . rfc1123DateFormat . parseDateTime ( dateStr ) . toDate ( ) ; } catch ( java . la... | org . junit . Assert . assertNull ( org . apache . shindig . common . util . DateUtil . parseRfc1123Date ( expires ) ) |
createStreamWrongInputRpcTest ( ) { this . payload = prepareDomPayload ( "create-data-change-event-subscription2" , "input" , "toaster" , "path2" ) ; final org . opendaylight . mdsal . dom . api . DOMRpcResult result = org . opendaylight . restconf . nb . rfc8040 . rests . utils . CreateStreamUtil . createDataChangeNot... | org . junit . Assert . assertEquals ( result . getErrors ( ) , java . util . Collections . emptyList ( ) ) |
childNestedInvocationWithException ( ) { me . prettyprint . hector . api . HConsistencyLevel defaultCl = me . prettyprint . hector . api . HConsistencyLevel . ALL ; com . datastax . hectorjpa . consitency . JPAConsistency . setDefault ( defaultCl ) ; com . datastax . hectorjpa . spring . service . ComplexService comple... | org . junit . Assert . assertEquals ( defaultCl , com . datastax . hectorjpa . consitency . JPAConsistency . get ( ) ) |
shouldCheckGetCustomerByZipCodeWithParamURI ( ) { javax . ws . rs . core . Response response = org . agoncal . sample . jaxrs . testing . CustomerCRUDRestServiceIT . client . target ( "http://localhost:8282/customer" ) . queryParam ( "zip" , 75011L ) . request ( ) . get ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testStartMS ( ) { com . bixly . pastevid . models . AudioFileItemTest . log ( "AudioFileItem.startMS" ) ; com . bixly . pastevid . models . AudioFileItem instance = new com . bixly . pastevid . models . AudioFileItem ( ) ; long expResult = java . lang . System . currentTimeMillis ( ) ; instance . setStartMS ( expResult... | org . junit . Assert . assertEquals ( expResult , result ) |
loadEmptyConfigurationDeprecated ( ) { final org . apache . logging . log4j . core . net . ssl . TrustStoreConfiguration ksc = new org . apache . logging . log4j . core . net . ssl . TrustStoreConfiguration ( null , TestConstants . NULL_PWD , null , null ) ; final java . security . KeyStore ks = ksc . getKeyStore ( ) ;... | org . junit . Assert . assertTrue ( ( ks == null ) ) |
testIsNotUniqueWhenNameIsUnique ( ) { final org . kie . workbench . common . dmn . client . editors . types . common . DataType dataType = makeDataType ( "uuid1" , "tCompany" ) ; doReturn ( asList ( makeDataType ( "uuid2" , "tPerson" ) , makeDataType ( "uuid3" , "tCity" ) ) ) . when ( validator ) . siblings ( dataType ... | org . junit . Assert . assertFalse ( validator . isNotUnique ( dataType ) ) |
testBaseDaoEnabled ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . dao . JdbcBaseDaoImplTest . One , java . lang . Integer > dao = createDao ( com . j256 . ormlite . dao . JdbcBaseDaoImplTest . One . class , true ) ; com . j256 . ormlite . dao . JdbcBaseDaoImplTest . One one = new com . j256 . ormlite .... | org . junit . Assert . assertEquals ( 1 , one . create ( ) ) |
test_GetText_Calls_getText_From_Pattern ( ) { doAnswer ( ( invocation ) -> new com . sun . jna . platform . win32 . WinNT . HRESULT ( 0 ) ) . when ( mockUnknown ) . QueryInterface ( any ( Guid . REFIID . class ) , any ( com . sun . jna . ptr . PointerByReference . class ) ) ; mmarquee . automation . pattern . Text patt... | org . junit . Assert . assertTrue ( text . equals ( "Hello" ) ) |
testSqoopOptionsCloneIsEqual ( ) { org . apache . sqoop . SqoopOptions options = createSqoopOptionsFilledWithRandomData ( ) ; options . getConf ( ) . setAllowNullValueProperties ( false ) ; org . apache . sqoop . SqoopOptions clonedOptions = ( ( org . apache . sqoop . SqoopOptions ) ( options . clone ( ) ) ) ; "<Assert... | org . junit . Assert . assertThat ( options ) |
testParents ( ) { java . lang . String s = "SELECT<sp>*<sp>from<sp>dbo.test<sp>where<sp>name<sp>like<sp>'%test%'<sp>;" ; org . antlr . v4 . runtime . tree . ParseTree tree = org . sonar . plugins . tsql . helpers . AntlrUtils . getRequest ( s ) . getRoot ( ) . getChild ( 0 ) . getChild ( 0 ) . getChild ( 0 ) . getChild... | org . junit . Assert . assertEquals ( 4 , nodes . length ) |
testTransformQuantityType ( ) { org . eclipse . smarthome . core . library . types . QuantityType < javax . measure . quantity . Dimensionless > airQuality = new org . eclipse . smarthome . core . library . types . QuantityType ( "992<sp>ppm" ) ; java . lang . String aqScaleFile = "scale/netatmo_aq.scale" ; java . lang... | org . junit . Assert . assertEquals ( expected , transformedResponse ) |
getFunctieAdresTestNotExist ( ) { final java . lang . String faCode = "Q" ; final java . lang . String resultFa = brpStamtabelService . getFunctieAdres ( faCode ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( resultFa , faCode ) |
testEquals ( ) { org . jfree . data . time . Day day1 = new org . jfree . data . time . Day ( 29 , org . jfree . chart . date . MonthConstants . MARCH , 2002 ) ; org . jfree . data . time . Hour hour1 = new org . jfree . data . time . Hour ( 15 , day1 ) ; org . jfree . data . time . Minute minute1 = new org . jfree . d... | org . junit . Assert . assertEquals ( minute1 , minute2 ) |
testFromEbXML ( ) { transformer . toEbXML ( query , ebXML ) ; org . openehealth . ipf . commons . ihe . xds . core . requests . query . SqlQuery result = new org . openehealth . ipf . commons . ihe . xds . core . requests . query . SqlQuery ( ) ; transformer . fromEbXML ( result , ebXML ) ; "<AssertPlaceHolder>" ; } fr... | org . junit . Assert . assertEquals ( query , result ) |
testExtractRegionFromDescription_getValidRegion ( ) { java . lang . String expectedRegion = "us-east-1" ; java . lang . String region = org . pentaho . amazon . AmazonRegion . extractRegionFromDescription ( "US<sp>East<sp>(N.<sp>Virginia)" ) ; "<AssertPlaceHolder>" ; } extractRegionFromDescription ( java . lang . Strin... | org . junit . Assert . assertEquals ( expectedRegion , region ) |
afterRequestMethodShouldReturnAnActualInstance ( ) { java . lang . String url = "test" ; com . navercorp . volleyextensions . volleyer . http . HttpMethod method = com . navercorp . volleyextensions . volleyer . http . HttpMethod . GET ; com . navercorp . volleyextensions . volleyer . VolleyerConfiguration configuratio... | org . junit . Assert . assertNotNull ( responseBuilder ) |
isNameFirstCategoryShowNull_NameNull ( ) { givenModel ( newCategories ( true , "red" ) , noEntries ( ) ) ; boolean result = ctrl . isNameFirstCategoryShowNull ( ) ; "<AssertPlaceHolder>" ; } isNameFirstCategoryShowNull ( ) { return ( ( model . getNameFirstCategory ( ) ) == null ) || ( model . getNameFirstCategory ( ) .... | org . junit . Assert . assertTrue ( result ) |
testAnnotationKept ( ) { final org . hyalinedto . test . domainclasses . Person dto = org . hyalinedto . api . Hyaline . dtoFromClass ( john , new org . hyalinedto . api . DTO ( ) { } ) ; java . lang . reflect . Field field = dto . getClass ( ) . getDeclaredField ( "address" ) ; org . hyalinedto . test . annotations . ... | org . junit . Assert . assertNotNull ( annotation ) |
makeCompleteFutureWithResultNotCompleteTest ( ) { java . lang . String result = org . threadly . util . StringUtils . makeRandomString ( 5 ) ; java . util . List < org . threadly . concurrent . future . SettableListenableFuture < ? > > futures = new java . util . ArrayList ( TEST_QTY ) ; for ( int i = 0 ; i < ( TEST_QT... | org . junit . Assert . assertEquals ( result , f . get ( ) ) |
pollerGoesDownCase009 ( ) { org . openstack . atlas . service . domain . pojos . LbIdAccountId lbActiveDuringHour = new org . openstack . atlas . service . domain . pojos . LbIdAccountId ( 1234 , 1234 ) ; lbsActiveDuringHour . add ( lbActiveDuringHour ) ; processedUsages = usageRollupProcessor . processRecords ( allUsa... | org . junit . Assert . assertEquals ( 2 , processedUsages . size ( ) ) |
weightedAverage ( ) { org . jpmml . evaluator . ProbabilityAggregator < java . lang . Double > aggregator = new org . jpmml . evaluator . ProbabilityAggregator < java . lang . Double > ( 0 , this . valueFactory . newVector ( 0 ) ) { @ org . jpmml . evaluator . Override public org . jpmml . evaluator . ValueFactory < ja... | org . junit . Assert . assertEquals ( new org . jpmml . evaluator . ValueMap ( ) , aggregator . weightedAverageMap ( ) ) |
composeBitmapOfOnesWithItself ( ) { com . googlecode . javaewah . EWAHCompressedBitmap bitmap = com . googlecode . javaewah . EWAHCompressedBitmap . bitmapOf ( ) ; bitmap . setSizeInBits ( com . googlecode . javaewah . EWAHCompressedBitmap . WORD_IN_BITS , true ) ; com . googlecode . javaewah . EWAHCompressedBitmap res... | org . junit . Assert . assertEquals ( bitmap , result ) |
testSearchBusinessObjectDefinitionValidParams ( ) { java . util . Set < org . finra . herd . model . api . xml . BusinessObjectDefinition > expectedBusinessObjectDefinitions = setUpTestEntitiesForSearchTesting ( ) ; org . finra . herd . model . api . xml . BusinessObjectDefinitionSearchResponse searchResponse = busines... | org . junit . Assert . assertEquals ( expectedBusinessObjectDefinitions , actualBusinessObjectDefinitions ) |
testNotNextNoMatchesAtTheEnd ( ) { java . util . List < org . apache . flink . streaming . runtime . streamrecord . StreamRecord < org . apache . flink . cep . Event > > inputEvents = new java . util . ArrayList ( ) ; org . apache . flink . cep . Event a1 = new org . apache . flink . cep . Event ( 40 , "a" , 1.0 ) ; or... | org . junit . Assert . assertEquals ( 0 , matches . size ( ) ) |
testCompare_NaturalAbundance ( ) { org . openscience . cdk . silent . Isotope iso = new org . openscience . cdk . silent . Isotope ( "C" ) ; iso . setNaturalAbundance ( 12.0 ) ; org . openscience . cdk . silent . Isotope iso2 = new org . openscience . cdk . silent . Isotope ( "C" ) ; iso2 . setNaturalAbundance ( 12.0 )... | org . junit . Assert . assertTrue ( iso . compare ( iso2 ) ) |
utilEvalForFunction ( ) { java . lang . String query = "declare<sp>function<sp>local:home()\n" + ( ( ( "{\n" + "<b>HOME</b>\n" ) + "};\n" ) + "util:eval(\"local:home()\")\n" ) ; org . xmldb . api . base . ResourceSet result = org . exist . xquery . XQueryFunctionsTest . existEmbeddedServer . executeQuery ( query ) ; "<... | org . junit . Assert . assertEquals ( 1 , result . getSize ( ) ) |
testGetOrderSize ( ) { strategy . start ( propFile ) ; strategy . lastPriceMap . put ( longTicker , 50.0 ) ; int expectedSize = 20 ; "<AssertPlaceHolder>" ; } getOrderSize ( com . sumzerotrading . data . Ticker ) { double lastPrice = lastPriceMap . get ( ticker ) ; return ( ( int ) ( java . lang . Math . round ( ( ( or... | org . junit . Assert . assertEquals ( expectedSize , strategy . getOrderSize ( longTicker ) ) |
backoffDoesNotAdjustDuringCoolDownPeriod ( ) { connPerRoute . setMaxPerRoute ( route , 4 ) ; final long now = java . lang . System . currentTimeMillis ( ) ; clock . setCurrentTime ( now ) ; impl . backOff ( route ) ; final long max = connPerRoute . getMaxPerRoute ( route ) ; clock . setCurrentTime ( ( now + 1 ) ) ; imp... | org . junit . Assert . assertEquals ( max , connPerRoute . getMaxPerRoute ( route ) ) |
testOnButtonAttachedWithDisplayDialog ( ) { org . valkyriercp . command . support . ActionCommand command = new org . valkyriercp . command . support . ActionCommand ( ) { protected void doExecuteCommand ( ) { } } ; command . setDisplaysInputDialog ( true ) ; org . valkyriercp . command . support . JButton button = new... | org . junit . Assert . assertEquals ( null , button . getText ( ) ) |
whenCommitted_thenIgnored ( ) { org . multiverse . commitbarriers . CountDownCommitBarrier barrier = new org . multiverse . commitbarriers . CountDownCommitBarrier ( 0 ) ; barrier . countDown ( ) ; "<AssertPlaceHolder>" ; } isCommitted ( ) { return ( status ) == ( org . multiverse . commitbarriers . CommitBarrier . Sta... | org . junit . Assert . assertTrue ( barrier . isCommitted ( ) ) |
testGetResourceRepresentationUnexistentWithContext ( ) { org . nuxeo . ecm . platform . relations . api . Resource resource = new org . nuxeo . ecm . platform . relations . api . impl . QNameResourceImpl ( "http://nuxeo.org/nxrelations/unexistent/" , "test" ) ; java . lang . Object object = service . getResourceReprese... | org . junit . Assert . assertNull ( object ) |
testGetLatitudeOnGreatCircleSameLatitudeHalfwayToSouthPole ( ) { com . github . davidmoten . grumpy . core . Position a = com . github . davidmoten . grumpy . core . Position . create ( ( - 45 ) , 20 ) ; com . github . davidmoten . grumpy . core . Position b = com . github . davidmoten . grumpy . core . Position . crea... | org . junit . Assert . assertEquals ( ( - 45 ) , halfwayLat , 1.0 ) |
getServiceForMarketplace_CustomerTemplate_Anonymous ( ) { org . oscm . domobjects . Product expected = new org . oscm . domobjects . Product ( ) ; expected . setType ( ServiceType . CUSTOMER_TEMPLATE ) ; expected . setTemplate ( new org . oscm . domobjects . Product ( ) ) ; expected . getTemplate ( ) . setStatus ( Serv... | org . junit . Assert . assertEquals ( 666L , actual . getKey ( ) ) |
intermediate_sorted ( ) { java . util . List < java . lang . Integer > sortedNumbers = java . util . stream . Stream . of ( 5 , 3 , 1 , 3 , 6 ) . sorted ( ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( sortedNumbers , contains ( 1 , 3 , 3 , 5 , 6 ) ) |
shouldConsumeGraph ( ) { final uk . gov . gchq . gaffer . graph . Graph graph = new uk . gov . gchq . gaffer . graph . Graph . Builder ( ) . addSchema ( schema ) . addStoreProperties ( new uk . gov . gchq . gaffer . store . StoreProperties ( properties ) ) . config ( config ) . build ( ) ; final uk . gov . gchq . gaffe... | org . junit . Assert . assertEquals ( expected , result ) |
testGetConnectionErrorMapWithNullMap ( ) { java . lang . Exception exc = mock ( com . terracotta . connection . api . Exception . class ) ; com . terracotta . connection . api . DetailedConnectionException connException = new com . terracotta . connection . api . DetailedConnectionException ( exc , null ) ; java . util... | org . junit . Assert . assertNull ( exceptionMap ) |
testDeepTree ( ) { int n = 9 ; org . antlr . test . CommonTree [ ] nodes = new org . antlr . test . CommonTree [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { nodes [ i ] = new org . antlr . test . CommonTree ( new org . antlr . runtime . CommonToken ( ( ( i + 1 ) * 10 ) ) ) ; } org . antlr . test . Tree g = nodes [ 0 ] ; o... | org . junit . Assert . assertEquals ( expecting , found ) |
testInNull ( ) { org . dayatang . persistence . jpa . Collection < java . lang . Object > value = null ; instance . in ( "id" , value ) ; org . dayatang . persistence . jpa . List < org . dayatang . persistence . test . domain . Dictionary > results = repository . find ( instance ) ; "<AssertPlaceHolder>" ; } isEmpty (... | org . junit . Assert . assertTrue ( results . isEmpty ( ) ) |
testKafkaMetricsNotNull ( ) { "<AssertPlaceHolder>" ; } metrics ( ) { return unmodifiableList ( new java . util . LinkedList ( this . metrics . values ( ) ) ) ; } | org . junit . Assert . assertNotNull ( metrics . metrics ( ) ) |
testMatchConnectionSameConnectioRequestInfoBound ( ) { javax . security . auth . Subject subject = null ; java . util . Set < org . apache . cxf . jca . core . resourceadapter . AbstractManagedConnectionImpl > connectionSet = new java . util . HashSet ( ) ; javax . resource . spi . ConnectionRequestInfo cri = new org .... | org . junit . Assert . assertEquals ( con1 , mcon ) |
testSetWrite ( ) { org . irods . jargon . core . connection . IRODSAccount irodsAccount = org . irods . jargon . core . pub . DataObjectAOImplTest . testingPropertiesHelper . buildIRODSAccountFromTestProperties ( org . irods . jargon . core . pub . DataObjectAOImplTest . testingProperties ) ; java . lang . String testF... | org . junit . Assert . assertTrue ( irodsFileForSecondaryUser . canWrite ( ) ) |
hasReadAlignmentConsistentWithReference_should_consider_SA_alignments ( ) { htsjdk . samtools . SAMRecord r = Read ( 0 , 1 , "5M5S" ) ; r . setAttribute ( "SA" , new au . edu . wehi . idsv . sam . ChimericAlignment ( Read ( 0 , 1 , "10M" ) ) . toString ( ) ) ; "<AssertPlaceHolder>" ; } hasReadAlignmentConsistentWithRef... | org . junit . Assert . assertTrue ( gridss . ExtractSVReads . hasReadAlignmentConsistentWithReference ( com . google . common . collect . ImmutableList . of ( r ) ) [ 0 ] ) |
shouldNotSplitDetailedMessageForOk ( ) { callbackHelper = new org . openstack . atlas . service . domain . services . helpers . CallbackHelper ( mOK ) ; java . lang . String dMsg = callbackHelper . detailedMessage ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( "" , dMsg ) |
shouldFailFindOrCreateNodeSessionPathNullPath ( ) { try { tools . findOrCreateNode ( session , NULL_STRING ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } findOrCreateNode ( javax . jcr . Session , java . lang . String ) { return findOrCreateNode ( session , path , null , null ) ; } | org . junit . Assert . assertTrue ( ( e instanceof java . lang . IllegalArgumentException ) ) |
findRolesByTypeTestNullRoleType ( ) { java . util . List < org . apache . cloudstack . acl . Role > returnedRoles = roleManagerImpl . findRolesByType ( null ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( accountManagerMock , org . mockito . Mockito . times ( 0 ) ) . isRootAdmin ( org . mockito . Mockito... | org . junit . Assert . assertEquals ( 0 , returnedRoles . size ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.