input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
copyInputStreamValidOutputStreamPosBufSz ( ) { java . io . ByteArrayOutputStream outputStream = new org . apache . maven . shared . utils . io . IOUtilTest . DontCloseByteArrayOutputStream ( ) ; byte [ ] input = new byte [ ] { 1 , 2 , 3 , 4 , 5 , 6 } ; org . apache . maven . shared . utils . io . IOUtil . copy ( new or... | org . junit . Assert . assertThat ( outputStream . toByteArray ( ) , org . hamcrest . CoreMatchers . is ( input ) ) |
testReplicationWhenBlockCorruption ( ) { org . apache . hadoop . hdfs . MiniDFSCluster cluster = null ; try { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; conf . setLong ( DFSConfigKeys . DFS_NAMENODE_RECONSTRUCTION_PENDING_TIMEOUT_SEC_KEY , 1 ) ; cluste... | org . junit . Assert . assertEquals ( 2 , numReplicaCreated ) |
createEnrollmentGroupQueryWithPageSizeSucceed ( tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . QuerySpecification ) { tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . ProvisioningServiceClient provisioningServiceClient = createClient ( ) ; new mockit . NonStri... | org . junit . Assert . assertNotNull ( query ) |
testGradient ( ) { cn . edu . hit . ir . JNN . Model m = new cn . edu . hit . ir . JNN . Model ( ) ; cn . edu . hit . ir . JNN . Trainers . SimpleSGDTrainer sgd = new cn . edu . hit . ir . JNN . Trainers . SimpleSGDTrainer ( m ) ; cn . edu . hit . ir . JNN . ComputationGraph cg = new cn . edu . hit . ir . JNN . Computa... | org . junit . Assert . assertEquals ( true , m . gradientCheck ( ) ) |
testGetDefinitions ( ) { org . eclipse . tracecompass . ctf . core . event . types . IDefinition result = fixture . getCurrentField ( ) ; "<AssertPlaceHolder>" ; } getCurrentField ( ) { return fDefinition ; } | org . junit . Assert . assertNotNull ( result ) |
doubleQuote ( ) { try { final java . lang . String content = this . parser . getTextFromFile ( com . github . jknack . antlr4ide . issues . Issue42 . class ) ; final org . eclipse . xtext . parser . IParseResult parseResults = this . parser . parse ( content ) ; final boolean syntaxErrors = parseResults . hasSyntaxErro... | org . junit . Assert . assertFalse ( syntaxErrors ) |
checkMessageMethod ( ) { java . lang . String str = "test" ; info . smart_tools . smartactors . feature_loading_system . interfaces . iplugin_loader . exception . PluginLoaderException exception = new info . smart_tools . smartactors . feature_loading_system . interfaces . iplugin_loader . exception . PluginLoaderExcep... | org . junit . Assert . assertEquals ( exception . getMessage ( ) , str ) |
test2 ( ) { final java . util . List < io . vertigo . dynamo . plugins . environment . dsl . entity . DslEntity > entities = dslDefinitionRepository . getGrammar ( ) . getEntities ( ) ; final io . vertigo . dynamo . plugins . environment . dsl . entity . DslEntity entity = io . vertigo . dynamo . environment . plugins ... | org . junit . Assert . assertNotNull ( definitionBody ) |
getPatient_shouldReturnNullWhenPersonDoesNotExist ( ) { executeDataSet ( org . openmrs . api . PatientServiceTest . USER_WHO_IS_NOT_PATIENT_XML ) ; org . openmrs . Patient patient = org . openmrs . api . PatientServiceTest . patientService . getPatientOrPromotePerson ( ( - 1 ) ) ; "<AssertPlaceHolder>" ; } getPatientOr... | org . junit . Assert . assertNull ( patient ) |
testFilterLess ( ) { io . katharsis . queryspec . QuerySpec querySpec = new io . katharsis . queryspec . QuerySpec ( io . katharsis . jpa . model . TestEntity . class ) ; querySpec . addFilter ( new io . katharsis . queryspec . FilterSpec ( java . util . Arrays . asList ( "longValue" ) , io . katharsis . queryspec . Fi... | org . junit . Assert . assertEquals ( 2 , list . size ( ) ) |
testNoRequiredDocuments ( ) { try { getSimpleController ( initAttributes ) . process ( processingAttributes , getComponentClass ( ) ) ; org . junit . Assert . fail ( "Should<sp>fail<sp>with<sp>an<sp>exception." ) ; } catch ( org . carrot2 . core . ProcessingException e ) { "<AssertPlaceHolder>" . contains ( "No<sp>valu... | org . junit . Assert . assertThat ( e . getMessage ( ) ) |
deveObterValorICMSInterestadualRemetenteComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMSUFDestino icmsUFDestino = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMSUFDestino ( ) ; final java . lang . String valorICMS... | org . junit . Assert . assertEquals ( valorICMSInterestadualRemetente , icmsUFDestino . getValorICMSInterestadualRemetente ( ) ) |
testInvalidParse ( ) { final java . lang . String urn = "urn:ogcx:def:CRS:EPSG:6.8:4326" ; try { org . geotools . referencing . factory . URN_Parser . buildParser ( urn ) ; org . junit . Assert . fail ( ) ; } catch ( org . opengis . referencing . NoSuchAuthorityCodeException e ) { "<AssertPlaceHolder>" ; } } getAuthori... | org . junit . Assert . assertEquals ( urn , e . getAuthorityCode ( ) ) |
ConcurrentJobsStatusTooManyRequestsException ( ) { try { org . apache . hive . hcatalog . templeton . JobRunnable jobRunnable = ConcurrentJobsStatus ( 6 , org . apache . hive . hcatalog . templeton . TestConcurrentJobRequestsThreadsAndTimeout . config , false , false , statusJobHelper . getDelayedResonseAnswer ( 4 , or... | org . junit . Assert . assertTrue ( false ) |
testStoreOverwriteExisting_shouldOverwrite ( ) { java . lang . String differentValue = "secondValue" ; org . apache . directory . shared . ldap . model . entry . Entry testEntry = newTestEntry ( testEntryName , baseDn ) ; org . apache . directory . shared . ldap . model . entry . Entry updatedEntry = newTestEntry ( tes... | org . junit . Assert . assertThat ( newResult . contains ( ouAttribute , differentValue ) , org . hamcrest . Matchers . is ( true ) ) |
testModifyTicketWriteFileNullTicketId ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyFileWriteNumber ( null , new java . lang . Integer ( 20000 ) ) ; "<AssertPlaceHolder>" ; } instanceForModifyFileWriteNumber ( java . l... | org . junit . Assert . assertNotNull ( pi ) |
testCheckAndMaintainErrorInMaintenanceRunningVms ( ) { when ( vmInstanceDao . listByHostId ( com . cloud . resource . ResourceManagerImplTest . hostId ) ) . thenReturn ( java . util . Arrays . asList ( vm1 , vm2 ) ) ; boolean enterMaintenanceMode = resourceManager . checkAndMaintain ( com . cloud . resource . ResourceM... | org . junit . Assert . assertFalse ( enterMaintenanceMode ) |
testGetSenseDocument ( ) { org . wikidata . wdtk . datamodel . helpers . SenseDocument o1 = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeSenseDocument ( factory . getSenseIdValue ( "L42-S1" , "foo" ) , java . util . Collections . singletonList ( factory . getMonolingualTextValue ( "en" , "foo" ) ) , ja... | org . junit . Assert . assertEquals ( o1 , o2 ) |
createDiagnosticsStatusNotificationRequest_withStatus_returnsDiagnosticsStatusNotificationRequestWithStatus ( ) { eu . chargetime . ocpp . feature . profile . test . DiagnosticsStatus status = DiagnosticsStatus . Idle ; eu . chargetime . ocpp . feature . profile . test . DiagnosticsStatusNotificationRequest result = pr... | org . junit . Assert . assertThat ( result . getStatus ( ) , org . hamcrest . core . Is . is ( status ) ) |
testIsDelayedQueue_Success ( ) { final redis . clients . jedis . Jedis jedis = net . greghaines . jesque . TestUtils . createJedis ( net . greghaines . jesque . utils . TestJedisUtils . CONFIG ) ; jedis . zadd ( net . greghaines . jesque . utils . TestJedisUtils . TEST_KEY , 1.0 , "bar" ) ; "<AssertPlaceHolder>" ; } is... | org . junit . Assert . assertTrue ( net . greghaines . jesque . utils . JedisUtils . isDelayedQueue ( jedis , net . greghaines . jesque . utils . TestJedisUtils . TEST_KEY ) ) |
testFetchPlan1 ( ) { com . orientechnologies . orient . core . sql . parser . SimpleNode result = checkRightSyntax ( ( "" + "select<sp>'Ay'<sp>as<sp>a<sp>,<sp>'bEE'<sp>as<sp>b<sp>from<sp>Foo<sp>fetchplan<sp>*:1" ) ) ; "<AssertPlaceHolder>" ; com . orientechnologies . orient . core . sql . parser . OSelectStatement sele... | org . junit . Assert . assertTrue ( ( result instanceof com . orientechnologies . orient . core . sql . parser . OSelectStatement ) ) |
decode ( ) { final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( encoded ) ; final com . flagstone . transform . coder . SWFDecoder decoder = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; fixture = new com . flagstone . transform . sound . Envelope ( decoder ) ; "<... | org . junit . Assert . assertNotNull ( fixture ) |
copyConstructor_worksOnSafeCopy ( ) { org . eclipse . rap . json . JsonObject copy = new org . eclipse . rap . json . JsonObject ( object ) ; object . add ( "foo" , 23 ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ( childCollections . size ( ) ) == 0 ) && ( ( cheatsheets . size ( ) ) == 0 ) ; } | org . junit . Assert . assertTrue ( copy . isEmpty ( ) ) |
testNotNullDefault ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . dao . JdbcBaseDaoImplTest . NotNullDefault , java . lang . Object > dao = createDao ( com . j256 . ormlite . dao . JdbcBaseDaoImplTest . NotNullDefault . class , true ) ; com . j256 . ormlite . dao . JdbcBaseDaoImplTest . NotNullDefault ... | org . junit . Assert . assertEquals ( 1 , dao . create ( notNullDefault ) ) |
shouldDetectCommonsAndUberJar ( ) { org . infinispan . commons . util . uberjar . ManifestUberJarDuplicatedJarsWarner scanner = new org . infinispan . commons . util . uberjar . ManifestUberJarDuplicatedJarsWarner ( ) { @ org . infinispan . commons . util . uberjar . Override java . util . List < java . lang . String >... | org . junit . Assert . assertFalse ( isClasspathCorrect ) |
testSerialization ( ) { org . jfree . chart . renderer . category . CategoryStepRenderer r1 = new org . jfree . chart . renderer . category . CategoryStepRenderer ( ) ; org . jfree . chart . renderer . category . CategoryStepRenderer r2 = ( ( org . jfree . chart . renderer . category . CategoryStepRenderer ) ( org . jf... | org . junit . Assert . assertEquals ( r1 , r2 ) |
createNewDrug_shouldCreateNewDrug ( ) { int before = service . getAllDrugs ( true ) . size ( ) ; java . lang . String json = "{\"concept\":\"0cbe2ed3-cd5f-4f46-9459-26127c9265ab\",\"name\":\"New<sp>Drug<sp>name\",\"dosageForm\":\"0cbe2ed3-cd5f-4f46-9459-26127c9265ab\",\"minimumDailyDose\":\"10\",\"maximumDailyDose\":\"... | org . junit . Assert . assertEquals ( ( before + 1 ) , service . getAllDrugs ( true ) . size ( ) ) |
testVerticalList ( ) { org . antlr . test . TreeAdaptor adaptor = new org . antlr . test . CommonTreeAdaptor ( ) ; org . antlr . test . TreeWizard wiz = new org . antlr . test . TreeWizard ( adaptor , org . antlr . test . TestTreeIterator . tokens ) ; org . antlr . test . CommonTree t = ( ( org . antlr . test . CommonT... | org . junit . Assert . assertEquals ( expecting , found ) |
testThatDoesntNormalizeIfStartsWithHttp ( ) { java . lang . String url = new net . vidageek . crawler . component . DefaultLinkNormalizer ( "http://test.com/foo" ) . normalize ( "http://other.com/bar" ) ; "<AssertPlaceHolder>" ; } normalize ( java . lang . String ) { java . lang . String normalizedUrl = delegate . norm... | org . junit . Assert . assertEquals ( "http://other.com/bar" , url ) |
testUpdate ( ) { try ( com . syncleus . ferma . tx . Tx tx = tx ( ) ) { com . gentics . mesh . core . data . TagFamily tagFamily = tagFamily ( "colors" ) ; tagFamily . setName ( "new<sp>Name" ) ; "<AssertPlaceHolder>" ; } } getName ( ) { return "Fix<sp>data<sp>inconsistency<sp>for<sp>older<sp>versions." ; } | org . junit . Assert . assertEquals ( "new<sp>Name" , tagFamily . getName ( ) ) |
serialize ( ) { com . google . gson . Gson gson = com . github . seratch . jslack . common . json . GsonFactory . createSnakeCase ( ) ; com . github . seratch . jslack . api . model . event . ChannelCreatedEvent event = new com . github . seratch . jslack . api . model . event . ChannelCreatedEvent ( ) ; event . setCha... | org . junit . Assert . assertThat ( generatedJson , org . hamcrest . CoreMatchers . is ( expectedJson ) ) |
testBoolean2 ( ) { java . lang . Boolean convertedBooolean = _converter . convertType ( ExpandoColumnConstants . BOOLEAN , "false" ) ; "<AssertPlaceHolder>" ; } convertType ( int , java . lang . Object ) { if ( data == null ) { return ( ( T ) ( data ) ) ; } data = handleCollections ( type , data ) ; data = handleString... | org . junit . Assert . assertFalse ( convertedBooolean ) |
testRoutedSimpleExtraction ( ) { final org . opendaylight . controller . md . sal . binding . impl . ContextReferenceExtractor extractor = org . opendaylight . controller . md . sal . binding . impl . ContextReferenceExtractor . from ( org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang... | org . junit . Assert . assertSame ( org . opendaylight . controller . md . sal . binding . impl . ContextExtractorTest . TEST_ROUTE , extractedValue ) |
testGetWorkerAddress ( ) { "<AssertPlaceHolder>" ; } getWorkerAddress ( ) { if ( ( workerAddress ) == null ) { return null ; } return com . hazelcast . simulator . protocol . core . SimulatorAddress . fromString ( workerAddress ) ; } | org . junit . Assert . assertEquals ( workerAddress , operation . getWorkerAddress ( ) ) |
testToFullyQualifiedNameClassString ( ) { final java . lang . String expected = "org.apache.commons.lang3.Test.properties" ; final java . lang . String actual = org . apache . commons . lang3 . ClassPathUtils . toFullyQualifiedName ( org . apache . commons . lang3 . ClassPathUtils . class , "Test.properties" ) ; "<Asse... | org . junit . Assert . assertEquals ( expected , actual ) |
testBasicVisibility ( ) { org . apache . accumulo . core . client . summary . SummarizerConfiguration sc = org . apache . accumulo . core . client . summary . SummarizerConfiguration . builder ( org . apache . accumulo . core . client . summary . summarizers . EntryLengthSummarizer . class ) . build ( ) ; org . apache ... | org . junit . Assert . assertEquals ( expected , stats ) |
testUpdateTagTypeNoChangesToDisplayNameExceptForCase ( ) { tagTypeDaoTestHelper . createTagTypeEntity ( org . finra . herd . service . TAG_TYPE , org . finra . herd . service . TAG_TYPE_DISPLAY_NAME , org . finra . herd . service . INTEGER_VALUE , org . finra . herd . service . TAG_TYPE_DESCRIPTION ) ; org . finra . he... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . TagType ( new org . finra . herd . model . api . xml . TagTypeKey ( TAG_TYPE ) , org . finra . herd . service . TAG_TYPE_DISPLAY_NAME . toLowerCase ( ) , INTEGER_VALUE_2 , TAG_TYPE_DESCRIPTION_2 ) , updatedTagType ) |
testInitConfFromServletContext ( ) { com . amadeus . session . SessionConfiguration sc = new com . amadeus . session . SessionConfiguration ( ) ; when ( servletContext . getAttribute ( SessionHelpers . SESSION_CONFIGURATION ) ) . thenReturn ( sc ) ; com . amadeus . session . SessionConfiguration configuration = com . a... | org . junit . Assert . assertEquals ( sc , configuration ) |
shouldOrderCanBeClosedWhenTypeIsForEachOpAndRecordIsLastAndThereIsEnoughtLastRecords ( ) { orderHasEnabledAutoClose ( ) ; stubTypeOfProductionRecording ( TypeOfProductionRecording . FOR_EACH ) ; productionTrackingIsLast ( ) ; stubSearchCriteriaResults ( 1L , 2L , 3L ) ; boolean shouldClose = orderClosingHelper . orderS... | org . junit . Assert . assertTrue ( shouldClose ) |
load_changeRefreshTimeInLoader_triggeredViaEntryProcessor ( ) { final long _probeTime = 4711 ; org . cache2k . Cache < java . lang . Integer , java . lang . Integer > c = target . cache ( new CacheRule . Specialization < java . lang . Integer , java . lang . Integer > ( ) { @ java . lang . Override public void extend (... | org . junit . Assert . assertEquals ( _probeTime , e . getRefreshedTime ( ) ) |
getting_user_should_not_return_user_if_there_is_no_preexisting_http_session ( ) { javax . servlet . http . HttpServletRequest request = mock ( javax . servlet . http . HttpServletRequest . class ) ; when ( request . getSession ( false ) ) . thenReturn ( null ) ; com . commafeed . frontend . session . SessionHelper sess... | org . junit . Assert . assertFalse ( user . isPresent ( ) ) |
testExpressionFactoryMatchAny ( ) { createDataSet ( ) ; org . apache . cayenne . query . SelectQuery < org . apache . cayenne . testdo . mt . ClientMtTable2 > table2Query = new org . apache . cayenne . query . SelectQuery ( org . apache . cayenne . testdo . mt . ClientMtTable2 . class ) ; table2Query . addOrdering ( ne... | org . junit . Assert . assertEquals ( 2 , table2List . size ( ) ) |
SaveFile ( ) { cruise . umple . util . SampleFileWriter . createFile ( "myapp.ump" , "namespace<sp>Airline\nclass<sp>Airline{1<sp>--<sp>*<sp>RegularFlight;}class<sp>RegularFlight<sp>{}" ) ; cruise . umple . util . SampleFileWriter . createFile ( "myapps.txt" , "p1\nmyapp.ump\n" ) ; cruise . umple . stats . StatsMain . ... | org . junit . Assert . assertEquals ( true , new cruise . umple . stats . File ( "results.xls" ) . exists ( ) ) |
testGetOutOfBandSchema ( ) { org . apache . avro . Schema mainSchema = org . apache . avro . SchemaBuilder . builder ( ) . record ( "Main" ) . fields ( ) . name ( "id" ) . type ( ) . intType ( ) . noDefault ( ) . endRecord ( ) ; org . apache . avro . Schema outOfBandSchema = org . apache . avro . SchemaBuilder . builde... | org . junit . Assert . assertEquals ( outOfBandSchema , actualOutOfBandSchema ) |
serializeDeserialize ( ) { final byte [ ] keyBlobBytes = createKeyBlobBytes ( ) ; final com . amazonaws . encryptionsdk . model . KeyBlob reconstructedKeyBlob = deserialize ( keyBlobBytes ) ; final byte [ ] reconstructedKeyBlobBytes = reconstructedKeyBlob . toByteArray ( ) ; "<AssertPlaceHolder>" ; } toByteArray ( ) { ... | org . junit . Assert . assertArrayEquals ( reconstructedKeyBlobBytes , keyBlobBytes ) |
testContainsMaterialAmount ( ) { org . spout . api . inventory . ItemStack item = getRandomItem ( ) ; org . spout . api . material . Material mat = item . getMaterial ( ) ; int amount = item . getAmount ( ) ; inventory . clear ( ) ; inventory . add ( item ) ; "<AssertPlaceHolder>" ; } contains ( org . spout . api . mat... | org . junit . Assert . assertTrue ( inventory . contains ( mat , amount ) ) |
testGetMetricsResources ( ) { java . util . Map < java . lang . String , java . lang . Object > report = reportLoader . loadReport ( "test" , "test.yaml" ) ; java . util . List < jp . primecloud . auto . puppet . report . MetricsResource > metricsResources = reportAnalyzer . getMetricsResources ( report ) ; for ( jp . ... | org . junit . Assert . assertEquals ( 8 , metricsResources . size ( ) ) |
testAddCardinalityFieldsToProjectFieldsNoWhitelist ( ) { datawave . query . cardinality . CardinalityConfiguration config = new datawave . query . cardinality . CardinalityConfiguration ( ) ; config . setCardinalityUidField ( "UUID" ) ; config . setCardinalityFieldReverseMapping ( reverseMap ) ; config . setCardinality... | org . junit . Assert . assertEquals ( 0 , revisedProjectFields . size ( ) ) |
jsonOptional ( ) { com . treasuredata . client . model . TDUser user = com . treasuredata . client . model . ObjectMappers . compactMapper ( ) . readValue ( com . treasuredata . client . model . TDUserTest . USER_WITHOUT_OPTIONAL_FIELDS_JSON , com . treasuredata . client . model . TDUser . class ) ; java . lang . Strin... | org . junit . Assert . assertThat ( parsed , org . hamcrest . Matchers . is ( user ) ) |
checkIfConnectionIsClosedWithoutTheConnection ( ) { "<AssertPlaceHolder>" ; verify ( connection , times ( 1 ) ) . isClosed ( ) ; } getConnectionToTest ( ) { return new com . arjuna . ats . internal . jdbc . ConnectionImple ( null , null , null , null , xaDataSource ) ; } | org . junit . Assert . assertFalse ( getConnectionToTest ( ) . isClosed ( ) ) |
testLoadImportConfigurationWithEmptyFile_shouldReturnEmptyList ( ) { org . apache . commons . io . FileUtils . forceDelete ( storageFile ) ; java . util . List < org . openengsb . core . api . model . ConfigItem < org . openengsb . core . workflow . drools . model . ImportDeclaration > > loaded = service . load ( new j... | org . junit . Assert . assertEquals ( 0 , loaded . size ( ) ) |
testInvalidTeacherStaffAssociation ( ) { org . slc . sli . api . security . context . validator . Set < java . lang . String > ids = new org . slc . sli . api . security . context . validator . HashSet < java . lang . String > ( org . slc . sli . api . security . context . validator . Arrays . asList ( staff1 . getEnti... | org . junit . Assert . assertFalse ( validator . validate ( EntityNames . STAFF , ids ) . equals ( ids ) ) |
testReadBoolean ( ) { javax . ws . rs . ext . MessageBodyReader p = new org . apache . cxf . jaxrs . provider . PrimitiveTextProvider ( ) ; boolean valueRead = ( ( java . lang . Boolean ) ( p . readFrom ( Boolean . TYPE , null , null , null , null , new java . io . ByteArrayInputStream ( "true" . getBytes ( ) ) ) ) ) ;... | org . junit . Assert . assertTrue ( valueRead ) |
testBasic ( ) { com . arjuna . ats . arjuna . AtomicAction A = new com . arjuna . ats . arjuna . AtomicAction ( ) ; com . hp . mwtests . ts . txoj . common . resources . AtomicObject B = new com . hp . mwtests . ts . txoj . common . resources . AtomicObject ( ) ; A . begin ( ) ; com . arjuna . ats . internal . txoj . a... | org . junit . Assert . assertTrue ( ( ( clr . type ( ) ) != null ) ) |
shouldFailWithCorrectPartialResultWhenEscapedKeyIsEmpty ( ) { java . lang . String result = null ; try { processor . process ( "{:}" , withoutContext ( ) , com . github . resource4j . resources . processors . BasicValuePostProcessorTest . RESOLVER ) ; } catch ( com . github . resource4j . resources . processors . Value... | org . junit . Assert . assertEquals ( "{:}" , result ) |
testSetCustomItemHeight ( ) { list . setData ( RWT . CUSTOM_ITEM_HEIGHT , new java . lang . Integer ( 123 ) ) ; "<AssertPlaceHolder>" ; } getItemHeight ( ) { checkWidget ( ) ; if ( ( customItemHeight ) == ( - 1 ) ) { if ( ! ( layoutCache . hasItemHeight ( ) ) ) { layoutCache . itemHeight = computeItemHeight ( ) ; } ret... | org . junit . Assert . assertEquals ( 123 , list . getItemHeight ( ) ) |
testPayoutResponseSuccess ( ) { final com . github . kpavlov . restws . server . model . Foo foo = new com . github . kpavlov . restws . server . model . Foo ( "aa" ) ; com . github . kpavlov . restws . server . model . AbstractResponseWrapper < com . github . kpavlov . restws . server . model . Foo > pw = new com . gi... | org . junit . Assert . assertThat ( foo2 . getName ( ) , org . hamcrest . CoreMatchers . is ( foo . getName ( ) ) ) |
shortCircuitedAvailableInGetFallbackUsingQueue ( ) { setUpTenacityCommand ( 2 , 100 ) ; final com . yammer . tenacity . core . TenacityCommand < ? > exceptionCommand = exceptionCommand ( ) ; exceptionCommand . execute ( ) ; while ( ! ( exceptionCommand . isCircuitBreakerOpen ( ) ) ) ; final java . util . concurrent . F... | org . junit . Assert . assertTrue ( result . get ( ) ) |
numProcessRecordsCallsTest ( ) { com . amazonaws . services . kinesis . clientlibrary . lib . worker . KinesisClientLibConfiguration workerConfig = new com . amazonaws . services . kinesis . clientlibrary . lib . worker . KinesisClientLibConfiguration ( leaseTable , streamId , credentials , com . amazonaws . services .... | org . junit . Assert . assertTrue ( ( ( numGetRecordsCalls > 0 ) && ( numGetRecordsCalls <= 3 ) ) ) |
saveAll_Integer_Test ( ) { java . util . List < de . bytefish . pgbulkinsert . pgsql . handlers . PgBulkInsertPrimitivesTest . SampleEntity > entities = new java . util . ArrayList ( ) ; de . bytefish . pgbulkinsert . pgsql . handlers . PgBulkInsertPrimitivesTest . SampleEntity entity = new de . bytefish . pgbulkinsert... | org . junit . Assert . assertEquals ( 1 , v ) |
test03DbShouldBeEmpty ( ) { "<AssertPlaceHolder>" ; } countByQuery ( ) { com . orientechnologies . orient . object . db . OObjectDatabaseTx db = dbf . db ( ) ; com . orientechnologies . orient . core . sql . query . OSQLSynchQuery < com . orientechnologies . orient . core . record . impl . ODocument > q = new com . ori... | org . junit . Assert . assertThat ( service . countByQuery ( ) , org . hamcrest . CoreMatchers . is ( 0L ) ) |
bnodeTest ( ) { org . apache . jena . arq . querybuilder . Expr e = factory . bnode ( ) ; "<AssertPlaceHolder>" ; } bnode ( ) { return new org . apache . jena . sparql . expr . E_BNode ( ) ; } | org . junit . Assert . assertTrue ( ( e instanceof org . apache . jena . arq . querybuilder . E_BNode ) ) |
testReadInt ( ) { java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; java . io . InputStream in ; try { converter . writeInt ( out , com . ibm . ws . jmx . connector . converter . JSONConverterTest . TEST_INT ) ; in = new java . io . ByteArrayInputStream ( out . toByteArray ( ) ) ; "<As... | org . junit . Assert . assertEquals ( converter . readInt ( in ) , com . ibm . ws . jmx . connector . converter . JSONConverterTest . TEST_INT ) |
removeNonContainedPart ( ) { org . uberfire . client . workbench . part . WorkbenchPartPresenter mockPresenter = mock ( org . uberfire . client . workbench . part . WorkbenchPartPresenter . class ) ; org . uberfire . client . workbench . part . WorkbenchPartPresenter . View mockPartView = mock ( WorkbenchPartPresenter ... | org . junit . Assert . assertFalse ( removed ) |
whenDoesNotContainPeriod ( ) { final java . lang . String actual = org . estatio . dnplugins . EstatioIdentifierFactory . generateIdentifierNameForJavaName ( "LEASETERM_ID" , IdentifierCase . UPPER_CASE , "_" ) ; "<AssertPlaceHolder>" ; } generateIdentifierNameForJavaName ( java . lang . String , org . datanucleus . st... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( "LEASETERM_ID" ) ) |
isStaticInitializerShouldReturnTrueWhenMethodIsStaticInitializer ( ) { final org . pitest . mutationtest . engine . gregor . MethodInfo testee = this . methodInfo . withMethodName ( "<clinit>" ) ; "<AssertPlaceHolder>" ; } isStaticInitializer ( ) { return "<clinit>" . equals ( this . methodName ) ; } | org . junit . Assert . assertThat ( testee . isStaticInitializer ( ) , org . hamcrest . Matchers . is ( true ) ) |
testListNull ( ) { "<AssertPlaceHolder>" ; } convert ( java . lang . Object ) { T t = null ; if ( attribute != null ) { if ( clazz . isAssignableFrom ( attribute . getClass ( ) ) ) { t = ( ( T ) ( attribute ) ) ; } else if ( attribute instanceof java . util . List ) { final java . util . List l = ( ( java . util . List... | org . junit . Assert . assertNull ( this . converter . convert ( new java . util . ArrayList ( ) ) ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . trash . model . TrashVersion . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . ... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testComponentFormatSad ( ) { org . sonatype . nexus . selector . Selector selector = buildSelector ( "component.format<sp>==<sp>'nuget'" ) ; "<AssertPlaceHolder>" ; } evaluate ( org . sonatype . nexus . selector . VariableSource ) { return java . lang . Boolean . TRUE . equals ( expression . evaluate ( org . sonatype .... | org . junit . Assert . assertFalse ( selector . evaluate ( source ) ) |
testSetParams ( ) { org . deeplearning4j . nn . layers . NeuralNetConfiguration conf = new org . deeplearning4j . nn . layers . NeuralNetConfiguration . Builder ( ) . optimizationAlgo ( OptimizationAlgorithm . LINE_GRADIENT_DESCENT ) . updater ( new org . nd4j . linalg . learning . config . Sgd ( 0.1 ) ) . layer ( new ... | org . junit . Assert . assertEquals ( params , l . params ( ) ) |
testOriginalNotTcf ( ) { java . io . File targetFolder = testContext . getTestOutputFolder ( ) ; org . apache . uima . jcas . JCas jcas = org . apache . uima . fit . factory . JCasFactory . createJCas ( ) ; de . tudarmstadt . ukp . dkpro . core . api . metadata . type . DocumentMetaData meta = de . tudarmstadt . ukp . ... | org . junit . Assert . assertEquals ( "okeydokey" , jcas2 . getDocumentText ( ) ) |
checkUpdate ( ) { org . eclipse . ice . datastructures . entry . StringEntry testKey = new org . eclipse . ice . datastructures . entry . StringEntry ( ) ; org . eclipse . ice . datastructures . entry . StringEntry testValue = new org . eclipse . ice . datastructures . entry . StringEntry ( ) ; org . eclipse . ice . vi... | org . junit . Assert . assertTrue ( listener . wasUpdated ( ) ) |
_ ( ) { java . lang . String targetFileName = java . lang . String . format ( "adsWriteFailure_%s.log.%d" , "000" , 12345678901234L ) ; "<AssertPlaceHolder>" ; } checkAcceptResult ( java . lang . String ) { java . io . File file = new java . io . File ( targetFileName ) ; file . deleteOnExit ( ) ; try { file . createNe... | org . junit . Assert . assertFalse ( checkAcceptResult ( targetFileName ) ) |
shouldReturnTrueWhenEqualToStartTime ( ) { java . util . Calendar cal = org . openstack . atlas . util . common . CalendarUtils . stringToCalendar ( "2013-01-29<sp>00:00:00" ) ; java . util . Calendar startTime = org . openstack . atlas . util . common . CalendarUtils . stringToCalendar ( "2013-01-29<sp>00:00:00" ) ; j... | org . junit . Assert . assertTrue ( isBetween ) |
clearAll ( ) { org . apache . flink . runtime . io . network . partition . ResultPartitionID partitionId = new org . apache . flink . runtime . io . network . partition . ResultPartitionID ( ) ; org . apache . flink . runtime . io . network . TaskEventDispatcher ted = new org . apache . flink . runtime . io . network .... | org . junit . Assert . assertFalse ( ted . publish ( partitionId , new org . apache . flink . runtime . iterative . event . AllWorkersDoneEvent ( ) ) ) |
testEqualQueryStatsWithLastInvocation ( ) { java . util . Comparator < org . apache . tomcat . jdbc . pool . interceptor . SlowQueryReport . QueryStats > queryStatsComparator = createComparator ( ) ; org . apache . tomcat . jdbc . pool . interceptor . SlowQueryReport . QueryStats q1 = new org . apache . tomcat . jdbc .... | org . junit . Assert . assertEquals ( 0 , queryStatsComparator . compare ( q1 , q1 ) ) |
dependencyMaintainedForSet ( ) { org . teavm . classlib . java . lang . reflect . FieldTest . ReflectableType instance = new org . teavm . classlib . java . lang . reflect . FieldTest . ReflectableType ( ) ; java . lang . reflect . Field field = org . teavm . classlib . java . lang . reflect . FieldTest . ReflectableTy... | org . junit . Assert . assertEquals ( 123 , ( ( org . teavm . classlib . java . lang . reflect . FieldTest . Foo ) ( instance . c ) ) . getValue ( ) ) |
resizerWhereSourceLargerThanDestination_MoreThan2Times ( ) { net . coobird . thumbnailator . resizers . Resizer resizer = Resizers . PROGRESSIVE ; net . coobird . thumbnailator . resizers . ResizerFactory factory = net . coobird . thumbnailator . resizers . DefaultResizerFactory . getInstance ( ) ; java . awt . Dimensi... | org . junit . Assert . assertEquals ( resizer , receivedResizer ) |
testSuperstepOne ( ) { org . apache . giraph . graph . Vertex < org . apache . hadoop . io . IntWritable , org . apache . giraph . examples . SimpleTriangleClosingComputation . IntArrayListWritable , org . apache . hadoop . io . NullWritable > vertex = new org . apache . giraph . graph . DefaultVertex < org . apache . ... | org . junit . Assert . assertEquals ( pairCheck , vertex . getValue ( ) . toString ( ) ) |
testGetUnpackSizeOne ( ) { org . apache . commons . compress . archivers . sevenz . Folder folder = new org . apache . commons . compress . archivers . sevenz . Folder ( ) ; folder . totalOutputStreams = 266L ; org . apache . commons . compress . archivers . sevenz . BindPair [ ] bindPairArray = new org . apache . comm... | org . junit . Assert . assertEquals ( 0L , folder . getUnpackSize ( ) ) |
parse_noparens ( ) { com . psddev . dari . db . Predicate pred = parser . parse ( "a<sp>=<sp>1<sp>and<sp>b<sp>=<sp>2<sp>or<sp>c<sp>=<sp>3" ) ; com . psddev . dari . db . Predicate expect = com . psddev . dari . db . CompoundPredicate . combine ( PredicateParser . OR_OPERATOR , com . psddev . dari . db . CompoundPredica... | org . junit . Assert . assertEquals ( expect , pred ) |
testDatumEindeNaDatumAanvang ( ) { final nl . bzk . brp . model . hisvolledig . momentview . kern . HuwelijkView huidigeSituatie = maakbestaandeSituatie ( 20101010 ) ; final nl . bzk . brp . model . bericht . kern . HuwelijkBericht nieuweSituatie = maakNieuweSituatie ( 20101011 ) ; final java . util . List < nl . bzk .... | org . junit . Assert . assertEquals ( 0 , berichtEntiteits . size ( ) ) |
testRevWalkDisposeClosesReader ( ) { try ( org . eclipse . jgit . lib . Repository repo = com . baeldung . jgit . helper . Helper . openJGitRepository ( ) ) { try ( org . eclipse . jgit . lib . ObjectReader reader = repo . newObjectReader ( ) ) { try ( org . eclipse . jgit . revwalk . RevWalk walk = new org . eclipse .... | org . junit . Assert . assertNotNull ( loader ) |
shouldDoVerifyRegularTextNotPresent ( ) { given ( commandProcessor . doCommand ( "isTextPresent" , new java . lang . String [ ] { "foo" } ) ) . willReturn ( "false" ) ; final boolean result = seleniumDriverFixture . doOn ( "verifyTextNotPresent" , "foo" ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { com . ... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( true ) ) |
testGetPrincipalsLocalGroup ( ) { java . util . Set < ? extends java . security . Principal > principals = principalProvider . getPrincipals ( createTestGroup ( ) . getID ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( size ) == 0 ; } | org . junit . Assert . assertTrue ( principals . isEmpty ( ) ) |
getValue ( ) { mandatorySubject . setValue ( "test" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( "test" , mandatorySubject . getValue ( ) ) |
difference_of_sets_java ( ) { java . util . Set < java . lang . String > possibleFriendRequests = new java . util . HashSet < java . lang . String > ( yourFriends ) ; possibleFriendRequests . removeAll ( myFriends ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 6 , possibleFriendRequests . size ( ) ) |
testHaalAdresEnVulAanMetHistorieNull ( ) { nl . bzk . brp . model . operationeel . kern . PersoonAdresModel nieuw = persoonAdresRepository . vulaanAdresMetHistorie ( null , true ) ; "<AssertPlaceHolder>" ; } vulaanAdresMetHistorie ( nl . bzk . brp . model . operationeel . kern . PersoonModel , boolean ) { if ( ( persoo... | org . junit . Assert . assertEquals ( null , nieuw ) |
shouldReturnFalseForNullVersion ( ) { org . togglz . appengine . activation . ApplicationVersionActivationStrategy strategy = new org . togglz . appengine . activation . ApplicationVersionActivationStrategy ( ) ; org . togglz . core . repository . FeatureState state = aVersionState ( null ) ; boolean active = strategy ... | org . junit . Assert . assertFalse ( active ) |
testExportOneCollectionWQuery ( ) { java . io . File f = null ; int entitiesToCreate = 5 ; try { f = new java . io . File ( "exportOneCollectionWQuery.json" ) ; } catch ( java . lang . Exception e ) { } f . deleteOnExit ( ) ; org . apache . usergrid . persistence . EntityManager em = org . apache . usergrid . managemen... | org . junit . Assert . assertEquals ( 1 , collectionList . size ( ) ) |
testAddFileAsStream ( ) { org . digidoc4j . Container container = this . createEmptyContainerBy ( Container . DocumentType . BDOC ) ; java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( "tere,<sp>tere" . getBytes ( ) ) ; container . addDataFile ( stream , "test1.txt" , "text/plain" ) ; this... | org . junit . Assert . assertEquals ( "test1.txt" , containerToTest . getDataFiles ( ) . get ( 0 ) . getName ( ) ) |
shouldConvertToUrlEncode ( ) { java . lang . String expectedUrlEncoded = "key1=value1&key2=value2" ; java . lang . String urlEncoded = requestMap . toUrlEncode ( "UTF-8" ) ; "<AssertPlaceHolder>" ; } toUrlEncode ( java . lang . String ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( Map ... | org . junit . Assert . assertEquals ( expectedUrlEncoded , urlEncoded ) |
testDeleteRowAndUpsertValueAtSameTS1 ( ) { try { final org . apache . phoenix . end2end . ConcurrentMutationsIT . MyClock clock = new org . apache . phoenix . end2end . ConcurrentMutationsIT . MyClock ( 1000 ) ; org . apache . phoenix . util . EnvironmentEdgeManager . injectEdge ( clock ) ; java . lang . String tableNa... | org . junit . Assert . assertEquals ( 0 , rowCount ) |
testMoreThanHalfEle ( ) { java . lang . Integer [ ] data = new java . lang . Integer [ ] { 1 , 2 , 3 , 2 , 2 , 2 , 5 , 4 , 2 } ; "<AssertPlaceHolder>" ; } moreThanHalfEle ( T [ ] ) { com . google . common . base . Preconditions . checkNotNull ( arr ) ; com . google . common . base . Preconditions . checkArgument ( ( ( ... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 2 ) , ssj . algorithm . ArrayUtil . moreThanHalfEle ( data ) ) |
testBogusProtocol1 ( ) { java . lang . String SERVER_URL = "foo://localhost:31000" ; "<AssertPlaceHolder>" ; } isValidServerURL ( java . lang . String ) { boolean valid = true ; try { new org . teiid . net . TeiidURL ( serverURL ) ; } catch ( java . lang . Exception e ) { valid = false ; } return valid ; } | org . junit . Assert . assertFalse ( org . teiid . net . TeiidURL . isValidServerURL ( SERVER_URL ) ) |
testGatk ( ) { java . lang . String headerLines = GATK_HEADER ; java . lang . String vcfLine = "1\t17452\t.\tG\tA\t35.74\t.\t" + ( ( "AC=2;AF=1.00;AN=2;DP=250;Dels=0.00;FS=0.000;GC=60.85;HRun=0;HaplotypeScore=0.0000;MLEAC=2;MLEAF=1.00;MQ=2.41;" + "MQ0=248;QD=0.14;SOR=2.303\t" ) + "GT:AD:DP:GQ:PL\t1/1:117,133:250:6:63,6... | org . junit . Assert . assertEquals ( SupportedVarCaller . GATK_CALLER , de . charite . compbio . jannovar . filter . impl . gt . SupportedVarCaller . guessFromGenotype ( gt ) ) |
returnsEmptyIteratorIfAskedToIterateFromStart ( ) { final java . lang . String stream = generateStreamName ( ) ; eventstore . appendToStream ( stream , ExpectedVersion . NO_STREAM , newTestEvents ( 20 ) ) . join ( ) ; java . util . Iterator < com . github . msemys . esjc . ResolvedEvent > iterator = eventstore . iterat... | org . junit . Assert . assertFalse ( iterator . hasNext ( ) ) |
deveObterCpfComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroDados retornoConsultaCadastroDados = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroDados ( ) ; retornoConsultaCadastroDados . setCpf ( "24868707... | org . junit . Assert . assertEquals ( "24868707841" , retornoConsultaCadastroDados . getCpf ( ) ) |
testResourcesUnderLibrary ( ) { com . facebook . buck . core . model . BuildTarget fileTarget = com . facebook . buck . core . model . BuildTargetFactory . newInstance ( rootPath , "//foo" , "file" ) ; com . facebook . buck . core . model . BuildTarget resourceTarget = com . facebook . buck . core . model . BuildTarget... | org . junit . Assert . assertThat ( resource . getName ( ) , org . hamcrest . CoreMatchers . equalTo ( "file" ) ) |
testToString ( ) { buffer . clear ( ) ; buffer . writeBytes ( copiedBuffer ( "Hello,<sp>World!" , CharsetUtil . ISO_8859_1 ) ) ; "<AssertPlaceHolder>" ; } toString ( java . nio . charset . Charset ) { return toString ( readerIndex , readableBytes ( ) , charset ) ; } | org . junit . Assert . assertEquals ( "Hello,<sp>World!" , buffer . toString ( CharsetUtil . ISO_8859_1 ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.