input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldEstablishConnectionWithRandomCaseUpgradeResponseHeader ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . kaazing . gateway . transport . test . Expectations ( ) { { oneOf ( handler ) .... | org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) ) |
testNonEmptyConfigurationString ( ) { java . lang . String configuration = ( ( ( ( "var1=aaa" + ( LINE_SEPARATOR ) ) + "var2=bbb" ) + ( LINE_SEPARATOR ) ) + "var3=ccc" ) + ( LINE_SEPARATOR ) ; io . strimzi . operator . cluster . model . OrderedProperties expectedConfiguration = createWithDefaults ( "var3" , "ccc" , "va... | org . junit . Assert . assertEquals ( expectedConfiguration , config . asOrderedProperties ( ) ) |
isIriInOntology ( ) { final org . semanticweb . owlapi . model . IRI iri = org . semanticweb . owlapi . model . IRI . create ( OWLOntologyHelperMethodsTest . TEST_IRI ) ; uk . co . flax . biosolr . ontology . core . owl . OWLDataManager dm = new uk . co . flax . biosolr . ontology . core . owl . OWLDataManager ( uk . c... | org . junit . Assert . assertTrue ( dm . isIriInOntology ( iri ) ) |
usesSecondCache ( ) { com . facebook . buck . util . cache . ProjectFileHashCache innerCache = com . facebook . buck . util . cache . impl . DefaultFileHashCache . createDefaultFileHashCache ( com . facebook . buck . io . filesystem . TestProjectFilesystems . createProjectFilesystem ( tmp . getRoot ( ) ) , fileHashCach... | org . junit . Assert . assertTrue ( innerCache2 . willGet ( path ) ) |
testVersioningEnabled ( ) { org . pentaho . di . repository . Repository repository = org . pentaho . di . ui . spoon . Mockito . mock ( org . pentaho . di . repository . Repository . class ) ; org . pentaho . di . repository . RepositorySecurityProvider securityProvider = org . pentaho . di . ui . spoon . Mockito . mo... | org . junit . Assert . assertTrue ( result ) |
testGetValue ( ) { System . out . println ( "getValue" ) ; kg . apc . charting . elements . GraphPanelChartExactElement instance = new kg . apc . charting . elements . GraphPanelChartExactElement ( 1 , 1 ) ; double expResult = 1.0 ; double result = instance . getValue ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { retu... | org . junit . Assert . assertEquals ( expResult , result , 0.0 ) |
testRemovePairsFromRepeatedLeavesFirst ( ) { java . util . List < java . lang . Integer > list = rx . Observable . just ( 3 , 1 , 2 , 1 , 2 ) . compose ( com . github . davidmoten . rx . TransformersTest . removePairs ( ) ) . toList ( ) . toBlocking ( ) . single ( ) ; "<AssertPlaceHolder>" ; } removePairs ( ) { rx . fu... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( 3 ) , list ) |
testSetSchedulingOptions_Operation ( ) { com . google . cloud . compute . deprecated . SchedulingOptions schedulingOptions = com . google . cloud . compute . deprecated . SchedulingOptions . standard ( true , SchedulingOptions . Maintenance . MIGRATE ) ; org . easymock . EasyMock . expect ( computeRpcMock . setScheduli... | org . junit . Assert . assertEquals ( zoneOperation , compute . setSchedulingOptions ( com . google . cloud . compute . deprecated . ComputeImplTest . INSTANCE_ID , schedulingOptions ) ) |
testConcurrentCloseAndMarkPsyncProcessed ( ) { int rount = 10 ; final java . util . concurrent . atomic . AtomicReference < java . lang . Exception > exception = new java . util . concurrent . atomic . AtomicReference ( ) ; java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ... | org . junit . Assert . assertNull ( exception . get ( ) ) |
testExtractTokens ( ) { com . github . pmerienne . trident . ml . preprocessing . TextInstanceCreator < java . lang . Boolean > instanceCreator = new com . github . pmerienne . trident . ml . preprocessing . TextInstanceCreator < java . lang . Boolean > ( false ) ; java . util . List < java . lang . String > actualWord... | org . junit . Assert . assertEquals ( expectedWords , actualWords ) |
testIsLastSubscription_OneSubscriptionsTwoTechnicalProducts ( ) { runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { @ org . oscm . domobjects . Override public org . oscm . domobjects . Void call ( ) throws org . oscm . domobjects . Exception { supplier = org . oscm . test . data . Organizati... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 1 ) , result ) |
testBatches ( ) { final int seed = 1 ; for ( int batchSize : new int [ ] { 1 , 2 , 5 , 10 } ) { final int actual = countIterations ( weka . iterators . instance . RelationalInstanceIteratorTest . data , rii , seed , batchSize ) ; final int expected = ( ( int ) ( java . lang . Math . ceil ( ( ( weka . iterators . instan... | org . junit . Assert . assertEquals ( expected , actual ) |
testSourceListing ( ) { org . apache . hadoop . tools . distcp2 . DistCpOptions options = org . apache . hadoop . tools . distcp2 . OptionsParser . parse ( new java . lang . String [ ] { "-f" , "hdfs://localhost:8020/source/first" , "hdfs://localhost:8020/target/" } ) ; "<AssertPlaceHolder>" ; } getSourceFileListing ( ... | org . junit . Assert . assertEquals ( options . getSourceFileListing ( ) , new org . apache . hadoop . fs . Path ( "hdfs://localhost:8020/source/first" ) ) |
testSignature ( ) { org . apache . cxf . service . Service service = createService ( ) ; java . util . Map < java . lang . String , java . lang . Object > inProperties = new java . util . HashMap ( ) ; inProperties . put ( ConfigurationConstants . ACTION , ConfigurationConstants . SIGNATURE ) ; inProperties . put ( Con... | org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) ) |
startWithListenerContainerStopped ( ) { when ( listenerContainer . isRunning ( ) ) . thenReturn ( false ) ; monitor . start ( ) ; "<AssertPlaceHolder>" ; } isRunning ( ) { return running ; } | org . junit . Assert . assertFalse ( monitor . isRunning ( ) ) |
testBasicKeyboardInput ( ) { driver . get ( pages . javascriptPage ) ; org . openqa . selenium . qtwebkit . hybridtests . WebElement keyReporter = driver . findElement ( org . openqa . selenium . qtwebkit . hybridtests . By . id ( "keyReporter" ) ) ; org . openqa . selenium . interactions . Action sendLowercase = getBu... | org . junit . Assert . assertThat ( keyReporter . getAttribute ( "value" ) , org . hamcrest . Matchers . is ( "abc<sp>def" ) ) |
testConcat ( ) { org . nd4j . linalg . api . ndarray . INDArray A = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 8 , 8 ) . reshape ( 2 , 2 , 2 ) ; org . nd4j . linalg . api . ndarray . INDArray B = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 12 , 12 ) . reshape ( 3 , 2 , 2 ) ; org . nd4j . linalg . a... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( new long [ ] { 5 , 2 , 2 } , concat . shape ( ) ) ) |
testFetchInterval ( ) { java . lang . String simpleScript = "echo<sp>NODE_ATTRIBUTE:pid,STRING,$$" ; writeNodeAttributeScriptFile ( simpleScript , true ) ; nodeAttributesProvider . init ( getConfForNodeAttributeScript ( ) ) ; nodeAttributesProvider . start ( ) ; java . util . Set < java . lang . String > resultSet = ne... | org . junit . Assert . assertEquals ( 1 , attributes . size ( ) ) |
testRowKeyWithOneGroup ( ) { measurement . withGroups ( java . util . Arrays . asList ( "group1" ) ) ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 100 ) . put ( org . apache . metron . profiler . hbase . SaltyRowKeyBuilder . getSalt ( measurement . getPeriod ( ) , org . apache . metron . profi... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( expected , actual ) ) |
assertYearsMonthsDaysInvariant_T1_Plus_T1UntilT2_Eq_T2 ( ) { net . time4j . Duration < net . time4j . CalendarUnit > period = this . start . until ( this . end , net . time4j . Duration . in ( net . time4j . CalendarUnit . YEARS , net . time4j . CalendarUnit . MONTHS , net . time4j . CalendarUnit . DAYS ) ) ; "<AssertP... | org . junit . Assert . assertThat ( this . start . plus ( period ) , org . hamcrest . CoreMatchers . is ( this . end ) ) |
testEncodingDecodingMs ( ) { java . util . Calendar cal = java . util . Calendar . getInstance ( ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { cal . set ( Calendar . MILLISECOND , i ) ; java . util . Date date = cal . getTime ( ) ; java . lang . String encoded = org . nuxeo . ecm . automation . client . model . DateParser ... | org . junit . Assert . assertEquals ( date , decoded ) |
testSetWrap_withFalse ( ) { org . eclipse . rap . rwt . template . TextCell cell = new org . eclipse . rap . rwt . template . TextCell ( template ) ; cell . setWrap ( false ) ; "<AssertPlaceHolder>" ; } isWrap ( ) { return wrap ; } | org . junit . Assert . assertFalse ( cell . isWrap ( ) ) |
testEvaluate_IMFMessage_msgIdExists_assertMessageIdEvaluated ( ) { org . nhindirect . monitor . expression . MessageIdCorrelationExpression exp = new org . nhindirect . monitor . expression . MessageIdCorrelationExpression ( ) ; java . lang . String msgId = java . util . UUID . randomUUID ( ) . toString ( ) ; java . ut... | org . junit . Assert . assertEquals ( msgId , exp . evaluate ( exchange , java . lang . String . class ) ) |
groupname ( ) { final com . groupon . lex . metrics . jmx . MBeanGroup mbg = new com . groupon . lex . metrics . jmx . MBeanGroup ( obj_name , com . groupon . lex . metrics . resolver . NamedResolverMap . EMPTY ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name_ ; } | org . junit . Assert . assertEquals ( groupname , mbg . getName ( ) ) |
testNoMatch08 ( ) { boolean matchResult = resultNamePatternMatcher . matchesEndToEnd ( "Aa.b.c" ) ; "<AssertPlaceHolder>" ; } matchesEndToEnd ( java . lang . String ) { return pattern . matcher ( input ) . matches ( ) ; } | org . junit . Assert . assertFalse ( matchResult ) |
emptyArrayTest ( ) { final org . sql2o . Sql2o database = new org . sql2o . Sql2o ( databaseRule . getDataSource ( ) ) ; try ( final org . sql2o . Connection connection = database . open ( ) ; final org . sql2o . Query query = connection . createQuery ( "SELECT<sp>*<sp>FROM<sp>FOO<sp>WHERE<sp>BAR<sp>IN<sp>(:bars)" ) ) ... | org . junit . Assert . assertThat ( noFoos . size ( ) , org . hamcrest . CoreMatchers . equalTo ( 0 ) ) |
isDeleted_positive ( ) { org . oscm . app . domain . ServiceInstance si = new org . oscm . app . domain . ServiceInstance ( ) ; si . setSubscriptionId ( "subscriptionId" ) ; si . setLocked ( true ) ; si . markForDeletion ( ) ; "<AssertPlaceHolder>" ; } isDeleted ( ) { return false ; } | org . junit . Assert . assertTrue ( si . isDeleted ( ) ) |
test ( ) { try { testBTreeSearchOperatorNodePushable ( ) ; } catch ( java . lang . Throwable th ) { th . printStackTrace ( ) ; org . junit . Assert . fail ( th . toString ( ) ) ; } System . out . println ( ( "Number<sp>of<sp>passed<sp>tests:<sp>" + ( successes ) ) ) ; System . out . println ( ( "Number<sp>of<sp>failed<... | org . junit . Assert . assertEquals ( failures , 0 ) |
withOneCent ( ) { "<AssertPlaceHolder>" ; } makeChangeWithQuarterDimeNickelPenny ( int ) { int [ ] components = new int [ ] { 25 , 10 , 5 , 1 } ; int [ ] [ ] cache = new int [ n + 1 ] [ components . length ] ; return makeChange ( n , 0 , components , cache ) ; } | org . junit . Assert . assertEquals ( 1 , s . makeChangeWithQuarterDimeNickelPenny ( 2 ) ) |
testIntersect ( ) { final org . apache . calcite . tools . RelBuilder builder = org . apache . calcite . tools . RelBuilder . create ( org . apache . calcite . test . RelBuilderTest . config ( ) . build ( ) ) ; org . apache . calcite . rel . RelNode root = builder . scan ( "DEPT" ) . project ( builder . field ( "DEPTNO... | org . junit . Assert . assertThat ( root , org . apache . calcite . test . Matchers . hasTree ( expected ) ) |
testGetCalculateCRC32SqlFile ( ) { java . lang . String sql = org . sagebionetworks . table . cluster . SQLUtils . getCalculateCRC32Sql ( ViewTypeMask . File . getMask ( ) ) ; java . lang . String expected = "SELECT<sp>SUM(CRC32(CONCAT(ID,<sp>'-',ETAG,<sp>'-',<sp>BENEFACTOR_ID)))" + "<sp>FROM<sp>ENTITY_REPLICATION<sp>W... | org . junit . Assert . assertEquals ( expected , sql ) |
testHandleNotifyDragEnter_alwaysSetsDataTypeField ( ) { org . eclipse . rap . json . JsonObject properties = new org . eclipse . rap . json . JsonObject ( ) . add ( "x" , 10 ) . add ( "y" , 20 ) . add ( "time" , 3 ) . add ( "operation" , "move" ) . add ( "feedback" , DND . FEEDBACK_INSERT_AFTER ) . add ( "item" , JsonO... | org . junit . Assert . assertTrue ( org . eclipse . swt . internal . dnd . DNDUtil . hasDataTypeChanged ( ) ) |
testBAC ( ) { createAndSaveWorker ( ) ; createAndSaveProject ( ) ; createAndSaveTwoTasksForProject ( ) ; assignAndSaveResourcesForTasks ( ) ; java . math . BigDecimal BAC = earnedValueCalculator . getBudgetAtCompletion ( orderModel . getOrder ( ) ) ; "<AssertPlaceHolder>" ; } getOrder ( ) { return orderController . get... | org . junit . Assert . assertEquals ( BAC , new java . math . BigDecimal ( 50 ) ) |
read_file_array_list_java ( ) { java . io . InputStream in = new java . io . FileInputStream ( worldSeriesWinners . toFile ( ) ) ; java . io . BufferedReader reader = new java . io . BufferedReader ( new java . io . InputStreamReader ( in ) ) ; java . util . List < java . lang . String > teams = new java . util . Array... | org . junit . Assert . assertEquals ( 10 , teams . size ( ) ) |
should_not_remove_WS ( ) { gus . add ( new ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . GenerationUnit ( builder . resourceFor ( EntityBuilderType . WS ) , null , null , null ) ) ; gus . add ( new ch . puzzle . itc . mobiliar . business . generator . control . extracted . temp... | org . junit . Assert . assertEquals ( 2 , result . size ( ) ) |
fromMaybeDoesNotEvaluateLeftFnForRight ( ) { com . jnape . palatable . lambda . adt . Maybe < java . lang . Integer > just = com . jnape . palatable . lambda . adt . Maybe . just ( 1 ) ; java . util . concurrent . atomic . AtomicInteger atomicInteger = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; com .... | org . junit . Assert . assertThat ( atomicInteger . get ( ) , org . hamcrest . core . Is . is ( 0 ) ) |
stringParsingFromExistingEnumMachine ( ) { unquietcode . tools . esm . EnumStateMachine < unquietcode . tools . esm . EnumStateMachine_T . Something > esm1 = new unquietcode . tools . esm . EnumStateMachine ( ) ; esm1 . addTransition ( unquietcode . tools . esm . EnumStateMachine_T . Something . One , unquietcode . too... | org . junit . Assert . assertEquals ( stringRepresentation , esm2 . toString ( ) ) |
shouldFailWhenNoAttributesToUpdate ( ) { org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( new org . openstack . atlas . api . validation . validators . LoadBalancer ( ) , org . openstack . atlas . api . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } pas... | org . junit . Assert . assertFalse ( result . passedValidation ( ) ) |
testCreateWithNonZeroPort ( ) { org . apache . hadoop . yarn . webapp . WebApp app = org . apache . hadoop . yarn . webapp . WebApps . $for ( this ) . at ( 50000 ) . start ( ) ; int port = app . getListenerAddress ( ) . getPort ( ) ; "<AssertPlaceHolder>" ; org . apache . hadoop . yarn . webapp . WebApp app2 = org . ap... | org . junit . Assert . assertEquals ( 50000 , port ) |
testBootstrapAddPrimary ( ) { final java . lang . String serverName = ( ( com . allanbank . mongodb . client . connection . rs . ReplicaSetConnectionFactoryTest . ourServer . getInetSocketAddress ( ) . getHostName ( ) ) + ":" ) + ( com . allanbank . mongodb . client . connection . rs . ReplicaSetConnectionFactoryTest .... | org . junit . Assert . assertEquals ( 2 , servers . size ( ) ) |
doOneFile ( ) { System . out . printf ( "%s%n" , endpoint ) ; ucar . nc2 . util . Counters fileCounters = ucar . nc2 . grib . GribCoordsMatchGbx . getCounters ( ) ; ucar . nc2 . grib . GribCoordsMatchGbx helper = new ucar . nc2 . grib . GribCoordsMatchGbx ( endpoint , fileCounters ) ; int fail = helper . readGridDatase... | org . junit . Assert . assertEquals ( 0 , fail ) |
testDefaultTTLWith0MaxAge ( ) { long ttl = org . codehaus . httpcache4j . cache . DefaultCacheItem . getTTL ( new org . codehaus . httpcache4j . cache . HTTPResponse ( Status . OK , createDefaultHeaders ( ) . add ( HeaderConstants . CACHE_CONTROL , "max-age=0" ) ) , DEFAULT_TTL ) ; "<AssertPlaceHolder>" ; } add ( java ... | org . junit . Assert . assertEquals ( DEFAULT_TTL , ttl ) |
testDUPN_2 ( ) { org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; program = new org . ethereum . vm . Program ( org . spongycastle . util . encoders . Hex . decode ( "80" ) , invoke ) ; try { vm . step ( program ) ; } finally { "<AssertPlaceHolder>" ; } } isStopped ( ) { return stopped ; } | org . junit . Assert . assertTrue ( program . isStopped ( ) ) |
test2 ( ) { long len = 1024 * 8 ; long bufferSize = 1024 * 8 ; long bufferCount = ( ( len + bufferSize ) - 1 ) / bufferSize ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { return _string . equalsIgnoreCase ( s ) ; } | org . junit . Assert . assertThat ( bufferCount , org . hamcrest . Matchers . is ( 1L ) ) |
testClear ( ) { deque . add ( org . apache . commons . pool2 . impl . TestLinkedBlockingDeque . ONE ) ; deque . add ( org . apache . commons . pool2 . impl . TestLinkedBlockingDeque . TWO ) ; deque . clear ( ) ; deque . add ( org . apache . commons . pool2 . impl . TestLinkedBlockingDeque . ONE ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertEquals ( 1 , deque . size ( ) ) |
constructInvalidJDBCSource ( ) { com . airhacks . enhydrator . in . JDBCSource cut = new com . airhacks . enhydrator . in . JDBCSource . Configuration ( ) . driver ( "org.airhacks.driver" ) . url ( "outer-space" ) . newSource ( ) ; "<AssertPlaceHolder>" ; } newSource ( ) { com . airhacks . enhydrator . in . JDBCSource ... | org . junit . Assert . assertNotNull ( cut ) |
testHashCode ( ) { final nl . moderniseringgba . migratie . conversie . model . brp . groep . BrpGeboorteInhoud inhoud1 = new nl . moderniseringgba . migratie . conversie . model . brp . groep . BrpGeboorteInhoud ( new nl . moderniseringgba . migratie . conversie . model . brp . attribuut . BrpDatum ( 19800101 ) , new ... | org . junit . Assert . assertEquals ( inhoud1 . hashCode ( ) , inhoud2 . hashCode ( ) ) |
testSinkTaskStartNoCommittedFiles ( ) { setUp ( ) ; io . confluent . connect . hdfs . HdfsSinkTask task = new io . confluent . connect . hdfs . HdfsSinkTask ( ) ; task . initialize ( context ) ; task . start ( properties ) ; java . util . Map < org . apache . kafka . common . TopicPartition , java . lang . Long > offse... | org . junit . Assert . assertEquals ( 0 , offsets . size ( ) ) |
getMedicationIdsWithIngredientId2 ( ) { final java . util . List < java . lang . Long > medicationIdsWithIngredientId = medicationsDao . getMedicationIdsWithIngredientId ( 10L , new org . joda . time . DateTime ( 2013 , 11 , 1 , 0 , 0 , 0 ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( medicationIdsWithIngredientId . isEmpty ( ) ) |
testAssumeTheType ( ) { net . openhft . chronicle . wire . InvalidYamWithCommonMistakesTest . DtoB expected = new net . openhft . chronicle . wire . InvalidYamWithCommonMistakesTest . DtoB ( "hello8" ) ; net . openhft . chronicle . wire . Marshallable actual = net . openhft . chronicle . wire . Marshallable . fromStrin... | org . junit . Assert . assertEquals ( expected , actual ) |
deepRemovesHasNoEffectOnOverlayingSet ( ) { com . google . firebase . database . core . CompoundWrite compoundWrite = com . google . firebase . database . core . CompoundWrite . emptyWrite ( ) ; java . util . Map < java . lang . String , java . lang . Object > base = new com . google . firebase . database . MapBuilder ... | org . junit . Assert . assertEquals ( expected , compoundWrite . apply ( baseNode ) ) |
existingDocumentFromUITemplateProviderSpecifiedButOldSpaceTypeButOverridenFromUIToTerminal ( ) { org . xwiki . model . reference . DocumentReference documentReference = new org . xwiki . model . reference . DocumentReference ( "tocreate" 3 , java . util . Arrays . asList ( "tocreate" 1 ) , "WebHome" ) ; com . xpn . xwi... | org . junit . Assert . assertNull ( result ) |
testIsDurableFalseIfResponseTopicAndDurableConfig ( ) { boolean isResponseTopic = true ; io . github . tcdl . msb . adapters . amqp . AmqpConsumerAdapter adapter = createAdapterWithDurableConf ( "myTopic" , "myGroupId" , isResponseTopic ) ; "<AssertPlaceHolder>" ; } isDurable ( ) { return ( ! ( isResponseTopic ) ) && (... | org . junit . Assert . assertFalse ( adapter . isDurable ( ) ) |
testParseAndSetLocaleOverride ( ) { final java . lang . String TEST_LOCALE_LANG = "en" ; final java . lang . String TEST_LOCALE_COUNTRY = "US" ; org . pentaho . platform . util . messages . LocaleHelper . parseAndSetLocaleOverride ( ( ( TEST_LOCALE_LANG + "_" ) + TEST_LOCALE_COUNTRY ) ) ; "<AssertPlaceHolder>" ; org . ... | org . junit . Assert . assertTrue ( org . pentaho . platform . util . messages . LocaleHelper . getLocale ( ) . equals ( new java . util . Locale ( TEST_LOCALE_LANG , TEST_LOCALE_COUNTRY ) ) ) |
testNoProject ( ) { com . mountainminds . eclemma . core . JavaProjectKit . waitForBuild ( ) ; org . eclipse . debug . core . ILaunchConfigurationWorkingCopy configuration = getJavaApplicationType ( ) . newInstance ( javaProject1 . project , "test.launch" ) ; final java . util . Collection < org . eclipse . jdt . core ... | org . junit . Assert . assertEquals ( set ( ) , set ( scope ) ) |
testGetMaxWithSwapUsage ( ) { try { me . haosdent . cgroup . subsystem . MemoryTest . one . getMemory ( ) . getMaxWithSwapUsage ( ) ; } catch ( java . io . IOException e ) { me . haosdent . cgroup . subsystem . MemoryTest . LOG . error ( "Set<sp>memsw.max_usage_in_bytes<sp>failed." , e ) ; "<AssertPlaceHolder>" ; } } g... | org . junit . Assert . assertTrue ( false ) |
type_with_boolean_convention_resolves_the_boolean_correctly ( ) { com . flextrade . jfixture . JFixture fixture = new com . flextrade . jfixture . JFixture ( ) ; testtypes . TypeWithBooleanConvention type = fixture . create ( testtypes . TypeWithBooleanConvention . class ) ; "<AssertPlaceHolder>" ; } isEnabled ( ) { re... | org . junit . Assert . assertTrue ( type . isEnabled ( ) ) |
writeAndRead ( ) { de . tuberlin . dima . aim3 . assignment1 . PrimeNumbersWritable original = new de . tuberlin . dima . aim3 . assignment1 . PrimeNumbersWritable ( 2 , 3 , 5 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 , 41 , 43 , 47 , 53 , 59 , 61 , 67 , 71 , 73 , 79 , 83 , 89 , 97 ) ; de . tuberlin . dima . aim3 . a... | org . junit . Assert . assertEquals ( original , clone ) |
testReadToGap2 ( ) { int expected = 6 ; int actual = de . nx42 . maps4cim . header . HeaderParser . readToGap ( de . nx42 . maps4cim . header . HeaderParserTest . inputGap , 0 , 3 ) ; "<AssertPlaceHolder>" ; } readToGap ( byte [ ] , int , int ) { return de . nx42 . maps4cim . util . math . KMPMatch . indexOf ( header ,... | org . junit . Assert . assertEquals ( expected , actual ) |
encryptOnly ( ) { addPublicEntry ( "key1" ) ; final com . amazonaws . encryptionsdk . jce . KeyStoreProvider mkp = new com . amazonaws . encryptionsdk . jce . KeyStoreProvider ( ks , com . amazonaws . encryptionsdk . jce . KeyStoreProviderTest . PP , "KeyStore" , "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" , "key1" ) ; fin... | org . junit . Assert . assertEquals ( 1 , ct . getMasterKeyIds ( ) . size ( ) ) |
isNewReceiptNotRequiredTestProduct ( ) { final de . metas . inoutcandidate . model . I_M_ReceiptSchedule previousReceiptSchedule = createReceiptSchedule ( bpartner1 , warehouse1 , date , product1_wh1 , 10 ) ; final de . metas . inoutcandidate . model . I_M_ReceiptSchedule receiptSchedule = createReceiptSchedule ( bpart... | org . junit . Assert . assertFalse ( isNewRequired ) |
get_primary_keys ( ) { com . hotels . bdp . waggledance . client . CloseableThriftHiveMetastoreIface thriftHiveMetastoreIface = factory . newInstance ( delegate ) ; org . apache . hadoop . hive . metastore . api . PrimaryKeysRequest primaryKeysRequest = new org . apache . hadoop . hive . metastore . api . PrimaryKeysRe... | org . junit . Assert . assertThat ( primaryKeysResponse , org . hamcrest . CoreMatchers . is ( new org . apache . hadoop . hive . metastore . api . PrimaryKeysResponse ( java . util . Collections . emptyList ( ) ) ) ) |
shouldTheAlgorithmReturnANumberOfSolutionsWhenSolvingASimpleProblem ( ) { org . uma . jmetal . algorithm . Algorithm < java . util . List < org . uma . jmetal . solution . DoubleSolution > > algorithm ; org . uma . jmetal . problem . DoubleProblem problem = new org . uma . jmetal . problem . multiobjective . Srinivas (... | org . junit . Assert . assertTrue ( ( ( population . size ( ) ) == 100 ) ) |
firstElementShouldBeReturnedWhenIterableHasOneElement ( ) { "<AssertPlaceHolder>" ; } getFirstOrNull ( java . util . Iterator ) { T result = null ; if ( iterator . hasNext ( ) ) { result = iterator . next ( ) ; } return result ; } | org . junit . Assert . assertEquals ( "test" , getFirstOrNull ( java . util . Collections . singletonList ( "test" ) ) ) |
testNegPosSameLength ( ) { java . lang . String numA = "-283746278342837476784564875684767" ; java . lang . String numB = "293478573489347658763745839457637" ; java . lang . String res = "-71412358434940908477702819237628" ; java . math . BigInteger aNumber = new java . math . BigInteger ( numA ) ; java . math . BigInt... | org . junit . Assert . assertTrue ( res . equals ( result . toString ( ) ) ) |
toStringTest ( ) { niciraActionDeserializerKey = new org . opendaylight . openflowjava . nx . api . NiciraActionDeserializerKey ( org . opendaylight . openflowjava . nx . api . NiciraActionDeserializerKeyTest . VERSION , 10 ) ; java . lang . String shouldBe = new java . lang . String ( "NiciraActionDeserializerKey<sp>[... | org . junit . Assert . assertEquals ( shouldBe , niciraActionDeserializerKey . toString ( ) ) |
test11 ( ) { com . creactiviti . piper . core . task . SpelTaskEvaluator evaluator = new com . creactiviti . piper . core . task . SpelTaskEvaluator ( ) ; com . creactiviti . piper . core . task . TaskExecution jt = com . creactiviti . piper . core . task . SimpleTaskExecution . createFrom ( "thing" , "${number}" ) ; c... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , evaluated . get ( "thing" ) ) |
testBug2482570 ( ) { java . lang . String msg = "UNT+11+123'" ; java . lang . String result = org . krysalis . barcode4j . tools . TestHelper . visualize ( org . krysalis . barcode4j . impl . pdf417 . PDF417HighLevelEncoder . encodeHighLevel ( msg ) ) ; java . lang . String expected = "613<sp>598<sp>601<sp>50<sp>32<sp>... | org . junit . Assert . assertEquals ( expected , result ) |
getMonthReservationsFiltredByCategoryOfUser ( ) { final org . silverpeas . resourcesmanager . web . ReservationEntity [ ] entities = getAt ( ( ( aMonthReservationResourceBaseURI ( ) ) + "/month/2013/02/14/user/10/resources/categories/1" ) , org . silverpeas . resourcesmanager . web . ReservationEntity [ ] . class ) ; "... | org . junit . Assert . assertNotNull ( entities ) |
addIndexEndRemovedTest ( ) { org . threadly . concurrent . collections . ConcurrentArrayList . DataSet < java . lang . Integer > result = org . threadly . concurrent . collections . ConcurrentArrayListDataSetTest . removedFromEnd . add ( 5 , 100 ) . add ( 0 , 200 ) ; java . lang . Integer [ ] expectedResult = new java ... | org . junit . Assert . assertTrue ( result . equals ( org . threadly . concurrent . collections . ConcurrentArrayListDataSetTest . makeDataSet ( expectedResult , 0 , expectedResult . length ) ) ) |
testStoreFetchDelete ( ) { com . basho . riak . client . query . RiakObject o = com . basho . riak . client . query . RiakObject . create ( bucket . unsafeGetValue ( ) ) . setValue ( "test<sp>value" ) ; com . basho . riak . client . StoreMeta storeMeta = new com . basho . riak . client . StoreMeta . Builder ( ) . retur... | org . junit . Assert . assertTrue ( tombstone . isNotFound ( ) ) |
byteRead ( ) { final byte [ ] data = new byte [ ] { 1 , 2 , 3 , 4 } ; final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( data ) ; final com . flagstone . transform . coder . BigDecoder fixture = new com . flagstone . transform . coder . BigDecoder ( stream ) ; fixture . mark ( ) ; fi... | org . junit . Assert . assertEquals ( 4 , fixture . bytesRead ( ) ) |
testIsOwner ( ) { long userId = 1 ; long teamId = 1 ; boolean isOwner = teamService . isOwner ( userId , teamId ) ; "<AssertPlaceHolder>" ; } isOwner ( long , long ) { com . xiaomi . shepher . model . Team team = teamBiz . getById ( teamId ) ; return ( team != null ) && ( ( team . getOwner ( ) ) == userId ) ; } | org . junit . Assert . assertEquals ( true , isOwner ) |
testItShouldCountTwelveMapsForBenzeneOntoBenzene ( ) { org . openscience . cdk . smsd . algorithm . vflib . interfaces . IMapper mapper = new org . openscience . cdk . smsd . algorithm . vflib . map . VFMapper ( benzene , true ) ; "<AssertPlaceHolder>" ; } countMaps ( org . openscience . cdk . smsd . algorithm . vflib ... | org . junit . Assert . assertEquals ( 12 , mapper . countMaps ( benzene ) ) |
expectAllReplaces ( ) { net . jforum . entities . Smilie s1 = new net . jforum . entities . Smilie ( ) ; s1 . setCode ( ":)" ) ; s1 . setDiskName ( "#s1#" ) ; net . jforum . entities . Smilie s2 = new net . jforum . entities . Smilie ( ) ; s2 . setCode ( ":D" ) ; s2 . setDiskName ( "#s2#" ) ; when ( container . instanc... | org . junit . Assert . assertEquals ( expected , formatter . format ( input , options ) ) |
test ( ) { org . locationtech . geowave . core . geotime . store . query . TemporalConstraints constraints = new org . locationtech . geowave . core . geotime . store . query . TemporalConstraints ( ) ; constraints . add ( new org . locationtech . geowave . core . geotime . store . query . TemporalRange ( new java . ut... | org . junit . Assert . assertEquals ( constraints , constraintsDup ) |
test ( ) { java . lang . String inputStr = "abc" ; byte [ ] data = inputStr . getBytes ( ) ; java . util . Map < java . lang . String , java . lang . Object > keyMap = com . mtools . core . plugin . security . DSACoder . initKey ( ) ; java . lang . String publicKey = com . mtools . core . plugin . security . DSACoder .... | org . junit . Assert . assertTrue ( status ) |
selectKeysMultiValues ( ) { com . gs . collections . api . multimap . set . MutableSetMultimap < java . lang . Integer , java . lang . String > mutableMultimap = com . gs . collections . impl . multimap . set . UnifiedSetMultimap . newMultimap ( ) ; mutableMultimap . putAll ( 1 , com . gs . collections . impl . list . ... | org . junit . Assert . assertEquals ( expectedImmutableMultimap , selectedMultimap ) |
testEmptyPortEquivalentToDefaultPortForHttps ( ) { final org . apache . hc . core5 . http . HttpHost host1 = new org . apache . hc . core5 . http . HttpHost ( "https" , "foo.example.com" , ( - 1 ) ) ; final org . apache . hc . core5 . http . HttpHost host2 = new org . apache . hc . core5 . http . HttpHost ( "https" , "... | org . junit . Assert . assertEquals ( uri1 , uri2 ) |
testCompliesNotWithWidthSmallerThanMinWidthInEm ( ) { com . eclipsesource . tabris . passepartout . internal . condition . MinWidthCondition condition = new com . eclipsesource . tabris . passepartout . internal . condition . MinWidthCondition ( new com . eclipsesource . tabris . passepartout . internal . unit . Em ( j... | org . junit . Assert . assertFalse ( complies ) |
reportsMeasurementDoneNull ( ) { final java . util . List < com . hartwig . hmftools . common . ecrf . datamodel . ValidationFinding > findings = com . hartwig . hmftools . patientdb . validators . PatientValidatorTest . validateNonFirstResponse ( com . hartwig . hmftools . patientdb . validators . PatientValidatorTest... | org . junit . Assert . assertEquals ( 1 , findings . size ( ) ) |
getExperimentsEmptyExperiemntSelectTest ( ) { com . intuit . wasabi . experimentobjects . Page . Name pageName = Page . Name . valueOf ( "testPage1" ) ; java . util . List < com . intuit . wasabi . repository . cassandra . pojo . index . PageExperimentByAppNamePage > mockedResult = new java . util . ArrayList ( ) ; moc... | org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
createUser ( ) { log . debug ( "create()" ) ; com . abixen . platform . core . domain . model . User . Builder userBuilder = com . abixen . platform . core . domain . model . User . builder ( ) ; userBuilder . credentials ( "username" , "password" ) ; userBuilder . screenName ( "screenName" ) ; userBuilder . personalDa... | org . junit . Assert . assertNotNull ( userFromDB ) |
testControleAllesFalseBehalveSoortVerbintenis ( ) { setup ( false , false , true ) ; "<AssertPlaceHolder>" ; } controleer ( nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Persoon , nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ) { fin... | org . junit . Assert . assertFalse ( subject . controleer ( persoon , verzoek ) ) |
testSaveCustomerWithInvalidEmail ( ) { loginSysAdmin ( ) ; org . thingsboard . server . common . data . Tenant tenant = new org . thingsboard . server . common . data . Tenant ( ) ; tenant . setTitle ( "My<sp>tenant" ) ; org . thingsboard . server . common . data . Tenant savedTenant = doPost ( "/api/tenant" , tenant ,... | org . junit . Assert . assertNotNull ( savedTenant ) |
getType_withCustomClassLoaderThatKnowsClass_returnsType ( ) { java . lang . ClassLoader loader = mock ( org . openengsb . core . edbi . jdbc . ClassLoader . class ) ; final java . lang . Class < ? > clazz = org . openengsb . core . edbi . models . TestModel . class ; when ( loader . loadClass ( "org.openengsb.core.edbi... | org . junit . Assert . assertEquals ( clazz , field . getType ( ) ) |
testSetEffectiveServerFaultPolicy ( ) { engine = new org . apache . cxf . ws . policy . PolicyEngineImpl ( ) ; org . apache . cxf . service . model . EndpointInfo ei = createMockEndpointInfo ( ) ; org . apache . cxf . service . model . BindingFaultInfo bfi = new org . apache . cxf . service . model . BindingFaultInfo (... | org . junit . Assert . assertSame ( epi , engine . getEffectiveServerFaultPolicy ( ei , null , bfi , ( ( org . apache . cxf . transport . Destination ) ( null ) ) , msg ) ) |
returnsNullV1Tag ( ) { com . mpatric . mp3agic . ID3v2 id3v2Tag = new com . mpatric . mp3agic . ID3WrapperTest . ID3v2TagForTesting ( ) ; com . mpatric . mp3agic . ID3Wrapper wrapper = new com . mpatric . mp3agic . ID3Wrapper ( null , id3v2Tag ) ; "<AssertPlaceHolder>" ; } getId3v1Tag ( ) { return id3v1Tag ; } | org . junit . Assert . assertEquals ( null , wrapper . getId3v1Tag ( ) ) |
testPathParamSpaceBuild ( ) { java . lang . String expected = "http://localhost:8080/name/%20" ; java . net . URI uri = javax . ws . rs . core . UriBuilder . fromUri ( "http://localhost:8080" ) . path ( "name/%20" ) . build ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return name ; } | org . junit . Assert . assertEquals ( expected , uri . toString ( ) ) |
shouldRaiseNoConstraintsViolation ( ) { org . agoncal . book . javaee7 . chapter03 . ex06 . Order06 order = new org . agoncal . book . javaee7 . chapter03 . ex06 . Order06 ( ) ; order . setOrderId ( "CA45678" ) ; order . setTotalAmount ( 1234.5 ) ; order . setCreationDate ( org . agoncal . book . javaee7 . chapter03 . ... | org . junit . Assert . assertEquals ( 0 , violations . size ( ) ) |
testRMFAILcommit1PC ( ) { javax . transaction . xa . XAResource theResource = new javax . transaction . xa . XAResource ( ) { @ com . hp . mwtests . ts . jta . jts . xa . Override public void start ( javax . transaction . xa . Xid xid , int flags ) throws javax . transaction . xa . XAException { } @ com . hp . mwtests ... | org . junit . Assert . assertTrue ( theTransaction . enlistResource ( theResource ) ) |
testGetResponseCode ( ) { System . out . println ( "getResponseCode" ) ; kg . apc . jmeter . samplers . DummySampler instance = new kg . apc . jmeter . samplers . DummySampler ( ) ; java . lang . String expResult = "" ; java . lang . String result = instance . getResponseCode ( ) ; "<AssertPlaceHolder>" ; } getResponse... | org . junit . Assert . assertEquals ( expResult , result ) |
testOperationWithWrongNameWrongExtension ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/wrong_name_operation.wrong" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . Sla... | org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) ) |
shouldGetScoreForNestedOperations ( ) { final uk . gov . gchq . gaffer . operation . impl . Map map = mock ( uk . gov . gchq . gaffer . operation . impl . Map . class ) ; final uk . gov . gchq . gaffer . operation . util . Conditional conditional = mock ( uk . gov . gchq . gaffer . operation . util . Conditional . clas... | org . junit . Assert . assertEquals ( 7 , score ) |
differentsLinesForDates ( ) { fr . treeptik . cloudunit . dto . LogResource line1 = new fr . treeptik . cloudunit . dto . LogResource ( "catalina.out" , "Hello,<sp>I<sp>am<sp>a<sp>log<sp>stackstrace!" ) ; fr . treeptik . cloudunit . dto . LogResource line2 = new fr . treeptik . cloudunit . dto . LogResource ( "localhos... | org . junit . Assert . assertFalse ( line1 . equals ( line2 ) ) |
getterSetter ( ) { me . whiteship . accounts . Account account = new me . whiteship . accounts . Account ( ) ; account . setUsername ( "whiteship" ) ; account . setPassword ( "password" ) ; "<AssertPlaceHolder>" ; } getUsername ( ) { return username ; } | org . junit . Assert . assertThat ( account . getUsername ( ) , org . hamcrest . CoreMatchers . is ( "whiteship" ) ) |
testBuild ( ) { org . lnu . is . domain . contact . type . ContactType context = new org . lnu . is . domain . contact . type . ContactType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>ContactType<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testMalformedPath ( ) { final java . lang . String path = "@notexample.com/mypath" ; final java . net . URI uri = new org . apache . hc . core5 . net . URIBuilder ( path ) . setHost ( "example.com" ) . build ( ) ; "<AssertPlaceHolder>" ; } getHost ( ) { return this . host ; } | org . junit . Assert . assertEquals ( "example.com" , uri . getHost ( ) ) |
testShortPathToo ( ) { byte [ ] data = new byte [ 52 ] ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . wrap ( data ) ; buffer . putShort ( ( ( short ) ( AdobePathSegment . CLOSED_SUBPATH_LENGTH_RECORD ) ) ) ; buffer . putShort ( ( ( short ) ( 2 ) ) ) ; buffer . position ( ( ( buffer . position ( ) ) + 22 )... | org . junit . Assert . assertNotNull ( path ) |
testAssertionError ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( false ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.