input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testIncorrectNumberOfArgs ( ) { com . yahoo . hive . udf . funnel . Fallout udf = new com . yahoo . hive . udf . funnel . Fallout ( ) ; org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspector [ ] inputOiList = new org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspector [ ] { org . ap... | org . junit . Assert . assertEquals ( null , udf . evaluate ( objs ) ) |
exceptionWithRemainingRetriesIsNotDone ( ) { final int NUM_TRIES = 2 ; com . basho . riak . client . core . FutureOperation operation = org . powermock . api . mockito . PowerMockito . spy ( new com . basho . riak . client . core . FutureOperationTest . FutureOperationImpl ( ) ) ; com . basho . riak . client . core . O... | org . junit . Assert . assertFalse ( operation . isDone ( ) ) |
findReturnsNullWhenEnforceGoalConfigurationIsNull ( ) { java . util . ArrayList < org . apache . maven . model . Plugin > buildPlugins = new java . util . ArrayList ( ) ; buildPlugins . add ( enforcerPlugin ) ; when ( mavenProject . getBuildPlugins ( ) ) . thenReturn ( buildPlugins ) ; java . util . ArrayList < org . a... | org . junit . Assert . assertNull ( new org . codehaus . mojo . versions . RequiredMavenVersionFinder ( mavenProject ) . find ( ) ) |
testRotateLeft ( ) { int [ ] [ ] test = new int [ ] [ ] { new int [ ] { 1 , 0 , 1 , 0 } , new int [ ] { 1 , 0 , 1 , 0 } , new int [ ] { 1 , 0 , 1 , 0 } , new int [ ] { 1 , 0 , 1 , 0 } } ; int [ ] [ ] expected = new int [ ] [ ] { new int [ ] { 0 , 0 , 0 , 0 } , new int [ ] { 1 , 1 , 1 , 1 } , new int [ ] { 0 , 0 , 0 , 0... | org . junit . Assert . assertEquals ( result [ i ] [ j ] , expected [ i ] [ j ] ) |
testGetKebabMenu ( ) { final elemental2 . dom . Element element = mock ( elemental2 . dom . Element . class ) ; doReturn ( element ) . when ( view ) . querySelector ( "kebab-menu" ) ; "<AssertPlaceHolder>" ; } getKebabMenu ( ) { return querySelector ( "kebab-menu" ) ; } | org . junit . Assert . assertEquals ( element , view . getKebabMenu ( ) ) |
testGeenGeefDetailsPersoonDienst ( ) { final int leveringAutorisatieId = 1 ; org . mockito . Mockito . when ( leveringsautorisatieService . geefLeveringautorisatie ( leveringAutorisatieId ) ) . thenReturn ( bouwLeveringsautorisatieNietGeheim ( leveringAutorisatieId ) ) ; final nl . bzk . brp . domain . leveringmodel . ... | org . junit . Assert . assertFalse ( berichtgegevens . isGeautoriseerd ( afnemerIndicatie ) ) |
testSplitSwiftPath ( ) { java . lang . String input = ( "container" + ( java . io . File . separator ) ) + "object" ; java . lang . String [ ] output = com . cloud . utils . SwiftUtil . splitSwiftPath ( input ) ; java . lang . String [ ] expected = new java . lang . String [ ] { "container" , "object" } ; "<AssertPlace... | org . junit . Assert . assertArrayEquals ( expected , output ) |
testDoSomething ( ) { javax . ws . rs . core . Response something = service . doSomething ( ) ; "<AssertPlaceHolder>" ; } doSomething ( ) { eventStore . tell ( new no . jansoren . mymicroservice . something . DoSomethingCommand ( ) , null ) ; return javax . ws . rs . core . Response . ok ( ) . build ( ) ; } | org . junit . Assert . assertNull ( something ) |
testCloning ( ) { com . flowpowered . math . imaginary . Quaternionf quaternion = new com . flowpowered . math . imaginary . Quaternionf ( 3 , 2 , 5 , 6 ) ; "<AssertPlaceHolder>" ; } clone ( ) { return new com . flowpowered . math . matrix . MatrixNd ( this ) ; } | org . junit . Assert . assertEquals ( quaternion , quaternion . clone ( ) ) |
testIndentOfMultilineAttributes ( ) { java . lang . String templates = ( ( ( "Terence\nis\na\nmaniac" 2 + "<sp><names;<sp>separator=\"\n\"Terence\nis\na\nmaniac" 4 ) + ( newline ) ) + "Terence\nis\na\nmaniac" 5 ) + ( newline ) ; writeFile ( tmpdir , "t.stg" , templates ) ; org . stringtemplate . v4 . STGroup group = ne... | org . junit . Assert . assertEquals ( expecting , t . render ( ) ) |
notIsStoppedIfStillItemsInBuffer ( ) { buffer . put ( org . talend . esb . job . controller . internal . MessageExchangeBufferTest . ME_1 ) ; buffer . stop ( ) ; "<AssertPlaceHolder>" ; } isStopped ( ) { return status . isStopped ( ) ; } | org . junit . Assert . assertFalse ( buffer . isStopped ( ) ) |
getUserId ( ) { java . lang . String userIdGiven = "xyzäüöß\"´`*~!§$%&/()" ; doReturn ( userIdGiven ) . when ( requestMock ) . getParameter ( Constants . REQ_PARAM_USER_ID ) ; java . lang . String userId = userBean . getUserId ( ) ; "<AssertPlaceHolder>" ; } getUserId ( ) { return userId ; } | org . junit . Assert . assertEquals ( userIdGiven , userId ) |
Superscript ( ) { gov . uspto . patent . doc . simplehtml . FreetextConfig config = new gov . uspto . patent . doc . simplehtml . FreetextConfig ( true , false ) ; java . lang . String xml = "<p>metallic<sp>barium<sp>ion<sp>can<sp>lose<sp>2<sp>electrons<sp>to<sp>become<sp>Ba<sup>2+</sup></p>" ; java . lang . String exp... | org . junit . Assert . assertEquals ( expect , plainText ) |
testApplyOrientation ( ) { java . io . InputStream inputStream = getClassLoaderResource ( "/contrib/tiff/multipage.tif" ) . openStream ( ) ; java . io . File inputFile = java . io . File . createTempFile ( "imageiotest" , "tif" ) ; byte [ ] data = com . twelvemonkeys . io . FileUtil . read ( inputStream ) ; com . twelv... | org . junit . Assert . assertArrayEquals ( original , rotated ) |
testOpen ( ) { java . util . Map conf = mock ( java . util . HashMap . class ) ; backtype . storm . task . TopologyContext context = mock ( backtype . storm . task . TopologyContext . class ) ; backtype . storm . spout . SpoutOutputCollector collector = mock ( backtype . storm . spout . SpoutOutputCollector . class ) ;... | org . junit . Assert . assertTrue ( ( ( java . lang . System . currentTimeMillis ( ) ) > yesterday ) ) |
shouldFindPostsWithAuthorAndBlogIdUsingDynamicSql ( ) { org . apache . ibatis . session . SqlSession session = org . apache . ibatis . session . SqlSessionTest . sqlMapper . openSession ( ) ; try { java . util . List < org . apache . ibatis . domain . blog . Post > posts = session . selectList ( "org.apache.ibatis.doma... | org . junit . Assert . assertEquals ( 2 , posts . size ( ) ) |
testUpdate ( ) { org . easymock . EasyMock . reset ( batchMock ) ; org . easymock . Capture < com . google . cloud . storage . spi . v1 . RpcBatch . Callback < com . google . api . services . storage . model . StorageObject > > callback = org . easymock . Capture . newInstance ( ) ; batchMock . addPatch ( org . easymoc... | org . junit . Assert . assertNotNull ( callback . getValue ( ) ) |
shouldInstrumentES6ClassMixin ( ) { java . lang . String source = "var<sp>calculatorMixin<sp>=<sp>Base<sp>=><sp>class<sp>extends<sp>Base<sp>{\n" + ( "<sp>calc()<sp>{<sp>}\n" + "};" ) ; java . lang . String instrumentedSource = sourceProcessor . instrumentSource ( source ) ; java . lang . String expectedSource = "_$jsco... | org . junit . Assert . assertEquals ( expectedSource , instrumentedSource ) |
testUpdate ( ) { studentService . createStudents ( 5 ) ; net . neoremind . fountain . test . po . Student student = net . neoremind . fountain . test . support . StudentHelper . getSingleStudent ( ) ; student . setStudentId ( ( ( net . neoremind . fountain . test . support . StudentHelper . STUDENT_ID_LAST ) + 2 ) ) ; ... | org . junit . Assert . assertThat ( student2 , org . hamcrest . Matchers . is ( student ) ) |
testAddAllListOfRdn002 ( ) { java . util . LinkedList < javax . naming . ldap . Rdn > test = new java . util . LinkedList < javax . naming . ldap . Rdn > ( ) ; javax . naming . ldap . LdapName ln = new javax . naming . ldap . LdapName ( "" ) ; ln . addAll ( test ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this ... | org . junit . Assert . assertEquals ( "" , ln . toString ( ) ) |
testIsJsonWorks ( ) { when ( httpServletRequest . getContentType ( ) ) . thenReturn ( ContentTypes . APPLICATION_JSON ) ; context . init ( servletContext , httpServletRequest , httpServletResponse ) ; "<AssertPlaceHolder>" ; } isRequestJson ( ) { return wrapped . isRequestJson ( ) ; } | org . junit . Assert . assertTrue ( context . isRequestJson ( ) ) |
testFilterString5 ( ) { java . lang . String filter = ( ( ( ( org . opennms . features . topology . plugins . topo . asset . layers . NodeParamLabels . ASSET_POLLERCATEGORY ) + "=testPollerCategory1" ) + ";" ) + ( org . opennms . features . topology . plugins . topo . asset . layers . NodeParamLabels . NODE_FOREIGNSOUR... | org . junit . Assert . assertEquals ( expected , s2 ) |
badFlowOngeldigeLa01MetPf03 ( ) { startProcess ( maakUc811Bericht ( "0599" , 1231231234L ) ) ; controleerBerichten ( 0 , 1 , 0 ) ; final nl . bzk . migratiebrp . bericht . model . lo3 . impl . Lq01Bericht lq01Bericht = getBericht ( nl . bzk . migratiebrp . bericht . model . lo3 . impl . Lq01Bericht . class ) ; lq01Beri... | org . junit . Assert . assertTrue ( processEnded ( ) ) |
booleansNotEqual ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( true , false ) |
Set_As_Text_And_Get_Value ( ) { com . mysema . rdfbean . model . UIDEditor editor = new com . mysema . rdfbean . model . UIDEditor ( ) ; editor . setAsText ( RDF . type . getId ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( RDF . type , editor . getValue ( ) ) |
testConflictEditedSamePoint ( ) { org . locationtech . jts . geom . Geometry oldGeom = new org . locationtech . jts . io . WKTReader ( ) . read ( "MULTILINESTRING<sp>((40<sp>40,<sp>20<sp>45,<sp>45<sp>30,<sp>40<sp>40),(20<sp>35,<sp>45<sp>10,<sp>30<sp>5,<sp>10<sp>30,<sp>20<sp>35))" ) ; org . locationtech . jts . geom . G... | org . junit . Assert . assertTrue ( diff . conflicts ( diff2 ) ) |
testBrpPersoonslijstGetter ( ) { final java . lang . String berichtOrigineel = org . apache . commons . io . IOUtils . toString ( nl . moderniseringgba . isc . esb . message . brp . impl . NotificatieVerzoekBerichtTest . class . getResourceAsStream ( "geslachtsnaamwijzigingVerzoekBericht.xml" ) ) ; final nl . modernise... | org . junit . Assert . assertNotNull ( geslachtsnaamwijzigingVerzoekBericht . getBrpPersoonslijst ( ) ) |
test_TransformationCompositionWithFilters ( ) { 1 2 3 4 5 6 1 2 3 4 java . util . ArrayList < java . lang . Double > input = new java . util . ArrayList < java . lang . Double > ( java . util . Arrays . asList ( 88.0 , 754.8 , 0.0 , 123456.2 , 321.3 , 3210.5 ) ) ; java . lang . Integer [ ] filteredOutFirstStage = new j... | org . junit . Assert . assertEquals ( expectedResults . get ( count ) , i ) |
testCompareDynAnyNamedMember ( ) { java . lang . String msg ; org . jacorb . test . UnionDefaultShortType type ; org . omg . CORBA . Any any = null ; org . omg . DynamicAny . DynUnion dynAny = null ; org . omg . DynamicAny . DynUnion dynAny2 = null ; type = new org . jacorb . test . UnionDefaultShortType ( ) ; type . w... | org . junit . Assert . assertTrue ( msg , dynAny . equal ( dynAny2 ) ) |
shouldHaveSameHashcodeGivenSameContents ( ) { java . util . List < java . lang . String > values = java . util . Arrays . asList ( "One" , "Two" ) ; uk . co . webamoeba . mockito . collections . util . LinkedSortedSet < java . lang . String > set = new uk . co . webamoeba . mockito . collections . util . LinkedSortedSe... | org . junit . Assert . assertEquals ( 0 , distance ) |
toStrTest3 ( ) { char a = 'a' ; java . lang . String result = cn . hutool . core . convert . Convert . convert ( java . lang . String . class , a ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . CharSequence ) { return "Custom:<sp>" + ( value . toString ( ) ) ; } | org . junit . Assert . assertEquals ( "a" , result ) |
embedded_05 ( ) { org . apache . jena . sparql . core . DatasetGraph dsg = org . apache . jena . fuseki . main . TestEmbeddedFuseki . dataset ( ) ; int port = org . apache . jena . atlas . web . WebLib . choosePort ( ) ; org . apache . jena . fuseki . main . FusekiServer server = org . apache . jena . fuseki . main . F... | org . junit . Assert . assertNull ( x ) |
test_getPathInWorkspace_windows_mixed_case_ok_JENKINS_45221 ( ) { java . lang . String workspace = "d:\\jenkins\\workspace\\d.admin_feature_Jenkinsfile-SCSMHLROYAGBAWY5ZNNG6ALR77MVLEH3F3EFF3O7XN3RO5BL6AMA" ; java . lang . String absolutePath = "D:\\jenkins\\workspace\\d.admin_feature_Jenkinsfile-SCSMHLROYAGBAWY5ZNNG6AL... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
hasAdminAccessReturnsTrueIfTheRolesContainUnverifiedUserAndAdmin ( ) { nl . knaw . huygens . timbuctoo . security . dto . VreAuthorization instance = nl . knaw . huygens . timbuctoo . security . dto . VreAuthorization . create ( "" , "" , nl . knaw . huygens . timbuctoo . security . UNVERIFIED_USER_ROLE , nl . knaw . h... | org . junit . Assert . assertThat ( allowedToWrite , org . hamcrest . core . Is . is ( true ) ) |
testDeprecation ( ) { java . lang . String value = "bar" ; java . lang . String oldKey = ( com . datatorrent . api . StreamingApplication . DT_PREFIX ) + ( Context . DAGContext . APPLICATION_NAME . getName ( ) ) ; java . lang . String newKey = LogicalPlanConfiguration . KEY_APPLICATION_NAME ; org . apache . hadoop . co... | org . junit . Assert . assertEquals ( value , config . get ( newKey ) ) |
checkDefault ( ) { final org . apache . openejb . server . FilteredServiceManager fsm = new org . apache . openejb . server . FilteredServiceManager ( new java . lang . String [ ] { "foo" } ) ; "<AssertPlaceHolder>" ; } accept ( java . io . File ) { return true ; } | org . junit . Assert . assertTrue ( fsm . accept ( "foo" ) ) |
testConstantSizePolicyWithJitter ( ) { conf . set ( HConstants . HBASE_REGION_SPLIT_POLICY_KEY , org . apache . hadoop . hbase . regionserver . ConstantSizeRegionSplitPolicy . class . getName ( ) ) ; htd . setMaxFileSize ( Long . MAX_VALUE ) ; boolean positiveJitter = false ; org . apache . hadoop . hbase . regionserve... | org . junit . Assert . assertFalse ( policy . shouldSplit ( ) ) |
testConfigureEnableDistanceOnly ( ) { System . out . println ( ( ( getTestTraceHead ( "[NGSICartoDBSink.configure]" ) ) + "--------<sp>Only<sp>enable_distance<sp>configuration<sp>works" ) ) ; org . apache . flume . Context context = new org . apache . flume . Context ( ) ; context . put ( "enable_distance" , "true" ) ;... | org . junit . Assert . assertTrue ( sink . getEnableDistanceHistoric ( ) ) |
itShouldProperlyBuild_Pow2_Histogram ( ) { io . datakernel . jmx . ValueStats stats = io . datakernel . jmx . ValueStats . create ( io . datakernel . jmx . ValueStatsTest . SMOOTHING_WINDOW ) . withHistogram ( ValueStats . POWERS_OF_TWO ) ; stats . recordValue ( ( - 10 ) ) ; stats . recordValue ( 0 ) ; stats . recordVa... | org . junit . Assert . assertEquals ( expected , stats . getHistogram ( ) ) |
canBuildDummyPrincipal ( ) { java . security . Principal dummyPrincipal = login . login ( "dummyName" ) ; "<AssertPlaceHolder>" ; } login ( javax . security . auth . callback . CallbackHandler ) { if ( ( clientLogin ) != null ) { return clientLogin . login ( cbHandler ) ; } return null ; } | org . junit . Assert . assertNotNull ( dummyPrincipal ) |
testCreateSyncedIdentityNull ( ) { "<AssertPlaceHolder>" ; } createSyncedIdentity ( org . apache . jackrabbit . api . security . user . Authorizable ) { if ( auth == null ) { return null ; } org . apache . jackrabbit . oak . spi . security . authentication . external . ExternalIdentityRef ref = org . apache . jackrabbi... | org . junit . Assert . assertNull ( org . apache . jackrabbit . oak . spi . security . authentication . external . basic . DefaultSyncContext . createSyncedIdentity ( null ) ) |
copyCollection_oneSubDoc_toExistingDest_canWriteDest ( ) { final org . exist . xmldb . XmldbURI src = org . exist . xmldb . XmldbURI . create ( "/db/test/source" ) ; final org . exist . xmldb . XmldbURI dest = org . exist . xmldb . XmldbURI . create ( "/db/test" ) ; final org . exist . xmldb . XmldbURI newName = org . ... | org . junit . Assert . assertEquals ( dest . append ( newName ) , newDestURICapture . getValue ( ) ) |
testParam ( ) { class Struct { @ org . scijava . util . SuppressWarnings ( "unused" ) private java . util . List < int [ ] > list ; } final java . lang . reflect . Type listType = type ( Struct . class , "list" ) ; final java . lang . reflect . Type paramType = org . scijava . util . Types . param ( listType , java . u... | org . junit . Assert . assertSame ( int [ ] . class , paramClass ) |
equals5 ( ) { org . diirt . util . time . TimeInterval interval = org . diirt . util . time . TimeInterval . between ( null , java . time . Instant . ofEpochSecond ( 0 , 0 ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( interval , equalTo ( org . diirt . util . time . TimeInterval . between ( null , java . time . Instant . ofEpochSecond ( 0 , 0 ) ) ) ) |
testBatchGetMaterial ( ) { com . jfinal . weixin . sdk . api . ApiResult ar = com . jfinal . weixin . sdk . api . MediaApi . batchGetMaterial ( MediaType . IMAGE , 1 , 10 ) ; java . lang . String json = ar . getJson ( ) ; System . out . println ( ( "testBatchGetMaterial:<sp>" + json ) ) ; "<AssertPlaceHolder>" ; } getJ... | org . junit . Assert . assertNotNull ( json ) |
shouldNotFilterLinksToWasNodes ( ) { com . navercorp . pinpoint . web . vo . Application fromApplication = new com . navercorp . pinpoint . web . vo . Application ( "WAS_FROM" , com . navercorp . pinpoint . common . trace . ServiceType . TEST_STAND_ALONE ) ; com . navercorp . pinpoint . web . vo . Application toApplica... | org . junit . Assert . assertFalse ( filteredLinkDataMap . getLinkDataList ( ) . isEmpty ( ) ) |
test_getChildren ( ) { ZK = org . goldenorb . zookeeper . ZookeeperUtils . connect ( org . goldenorb . zookeeper . ZookeeperUtilsTest . orbConf . getOrbZooKeeperQuorum ( ) ) ; ZK . create ( "/node" , new byte [ 0 ] , Ids . OPEN_ACL_UNSAFE , CreateMode . PERSISTENT ) ; ZK . create ( "/node/child1" , new byte [ 0 ] , Ids... | org . junit . Assert . assertTrue ( ( ( list . size ( ) ) == 2 ) ) |
givenRandomPerson_whenCreate_thenPersonPersisted ( ) { com . baeldung . couchbase . spring . person . Person person = randomPerson ( ) ; personService . create ( person ) ; java . lang . String id = person . getId ( ) ; "<AssertPlaceHolder>" ; } read ( int ) { return this . getContent ( ) . toString ( ) . substring ( 0... | org . junit . Assert . assertNotNull ( personService . read ( id ) ) |
testGunzip ( ) { byte [ ] input1 = org . apache . cayenne . crypto . unit . CryptoUnitUtils . hexToBytes ( "1f8b0800000000000000f348cdc9c957f0409000a91a078c11000000" ) ; byte [ ] output1 = org . apache . cayenne . crypto . transformer . bytes . GzipDecryptor . gunzip ( input1 ) ; byte [ ] expectedOutput1 = "Hello<sp>He... | org . junit . Assert . assertArrayEquals ( expectedOutput1 , output1 ) |
testMessageCorrelateAllResultListWithResultTypeProcessDefinition ( ) { java . util . List < org . camunda . bpm . engine . runtime . MessageCorrelationResult > resultList = runtimeService . createMessageCorrelation ( "newInvoiceMessage" ) . correlateAllWithResult ( ) ; "<AssertPlaceHolder>" ; for ( org . camunda . bpm ... | org . junit . Assert . assertEquals ( 1 , resultList . size ( ) ) |
should_create_complex_query ( ) { final java . lang . String name = "findByNameAndTemporalBetweenOrEnabledIsNull" + ( "AndCamelCaseLikeIgnoreCaseAndEmbedded_embeddNotEqualIgnoreCase" + "OrderByEmbedded_embeddDesc" ) ; final java . lang . String expected = "select<sp>e<sp>from<sp>Simple<sp>e<sp>" + ( ( ( ( ( "where<sp>e... | org . junit . Assert . assertEquals ( expected , result ) |
testWithNoModeChanges ( ) { org . kitteh . irc . client . library . Client clientMock = org . mockito . Mockito . mock ( org . kitteh . irc . client . library . Client . class ) ; org . mockito . Mockito . when ( clientMock . getNick ( ) ) . thenReturn ( org . kitteh . irc . client . library . command . UserModeCommand... | org . junit . Assert . assertFalse ( sut . toString ( ) . isEmpty ( ) ) |
hashCodeBlankNode ( ) { final org . apache . commons . rdf . api . BlankNode bnode1 = factory . createBlankNode ( ) ; "<AssertPlaceHolder>" ; } uniqueReference ( ) { return uniqueReference ; } | org . junit . Assert . assertEquals ( bnode1 . uniqueReference ( ) . hashCode ( ) , bnode1 . hashCode ( ) ) |
doesNotAcceptEmptyFile ( ) { boolean fileAccepted = caseInsensitiveFileFilter . accept ( new java . io . File ( "" ) ) ; "<AssertPlaceHolder>" ; } accept ( java . io . File ) { return ( ( f . isDirectory ( ) ) || ( "*" . equals ( extension ) ) ) || ( f . getName ( ) . toLowerCase ( java . util . Locale . getDefault ( )... | org . junit . Assert . assertThat ( fileAccepted , org . hamcrest . core . Is . is ( false ) ) |
toCompilableType_A$String$List$String_StringIsEmpty ( ) { org . junithelper . core . extractor . TypeNameConverter target = new org . junithelper . core . extractor . TypeNameConverter ( config ) ; java . lang . String typeName = "" ; java . util . List < java . lang . String > importedList = new java . util . ArrayLis... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
testEmptyAddressParse ( ) { com . sun . mail . util . logging . InternetAddress [ ] a = com . sun . mail . util . logging . InternetAddress . parse ( "" , false ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String , boolean ) { return javax . mail . internet . InternetAddress . parse ( addresslist , strict , fals... | org . junit . Assert . assertTrue ( ( ( a . length ) == 0 ) ) |
EmptyPlan ( ) { System . out . println ( "EmptyPlan" ) ; org . aksw . limes . core . execution . planning . planner . HeliosPlanner p = new org . aksw . limes . core . execution . planning . planner . HeliosPlanner ( source , target ) ; org . aksw . limes . core . io . ls . LinkSpecification ls = new org . aksw . limes... | org . junit . Assert . assertTrue ( ( ( plan . isEmpty ( ) ) == true ) ) |
getAllWithEmptyRegistryShouldReturnEmptySet ( ) { "<AssertPlaceHolder>" ; } getAll ( ) { io . cereebro . core . Snitch s1 = new io . cereebro . core . StaticSnitch ( java . net . URI . create ( "fake://1" ) ) ; io . cereebro . core . Snitch s2 = new io . cereebro . core . StaticSnitch ( java . net . URI . create ( "fak... | org . junit . Assert . assertTrue ( io . cereebro . core . CompositeSnitchRegistry . of ( ) . getAll ( ) . isEmpty ( ) ) |
testFloatConversionNoTypeInfo ( ) { final float v_float = 3.1F ; final org . apache . felix . configurator . impl . json . TypeConverter converter = new org . apache . felix . configurator . impl . json . TypeConverter ( null ) ; final java . lang . Object result = converter . convert ( null , v_float , null ) ; "<Asse... | org . junit . Assert . assertTrue ( ( result instanceof java . lang . Double ) ) |
testNewDataWillAppendClientIp ( ) { java . lang . String logStore = "logstore-" + ( getNowTimestamp ( ) ) ; ensureLogStoreEnabled ( com . aliyun . openservices . log . functiontest . TEST_PROJECT , logStore , true ) ; int written = writeData ( logStore ) ; "<AssertPlaceHolder>" ; } countLogGroupWithClientIpTag ( java .... | org . junit . Assert . assertEquals ( written , countLogGroupWithClientIpTag ( com . aliyun . openservices . log . functiontest . TEST_PROJECT , logStore , 2 ) ) |
testAddUserToRequiredUserGroups ( ) { long [ ] requiredUserGroupIds = addRequiredUserGroups ( ) ; int initialUserGroupUsersCount = com . liferay . portal . kernel . service . UserLocalServiceUtil . getUserGroupUsersCount ( requiredUserGroupIds [ 0 ] ) ; com . liferay . portal . security . membership . policy . test . u... | org . junit . Assert . assertEquals ( ( initialUserGroupUsersCount + 1 ) , com . liferay . portal . kernel . service . UserLocalServiceUtil . getUserGroupUsersCount ( requiredUserGroupIds [ 0 ] ) ) |
testErrorProbabilitiesDoubleArray ( ) { double [ ] errorProbabilities = new double [ 4 ] ; org . biojava . nbio . genome . io . fastq . FastqTools . errorProbabilities ( builder . build ( ) , errorProbabilities ) ; for ( int i = 0 ; i < 0 ; i ++ ) { "<AssertPlaceHolder>" ; } } build ( ) { if ( ( description ) == null )... | org . junit . Assert . assertTrue ( ( ( errorProbabilities [ i ] ) > 0.0 ) ) |
listUnmergedCommitsWhenMasterIsSameAsBranch_shouldReturnEmptyList ( ) { writeSomethingToCache ( ) ; org . eclipse . jgit . revwalk . RevCommit masterFirst = commitToMaster ( ) ; com . beijunyi . parallelgit . utils . BranchUtils . createBranch ( "test_branch" , masterFirst , repo ) ; java . util . List < org . eclipse ... | org . junit . Assert . assertTrue ( unmerged . isEmpty ( ) ) |
windowsCommandBuilderDriverTest ( ) { org . apache . reef . runtime . common . client . api . JobSubmissionEvent event = mock ( org . apache . reef . runtime . common . client . api . JobSubmissionEvent . class ) ; org . apache . reef . util . Optional < java . lang . Integer > memory = org . apache . reef . util . Opt... | org . junit . Assert . assertEquals ( expected , actual ) |
testWriteRead ( ) { org . apache . accumulo . core . data . Value v = new org . apache . accumulo . core . data . Value ( org . apache . accumulo . core . data . ValueTest . DATA ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . DataOutputStream dos = new java . io . D... | org . junit . Assert . assertArrayEquals ( org . apache . accumulo . core . data . ValueTest . DATA , v2 . get ( ) ) |
testCleanForFlushedData ( ) { byte [ ] b = new byte [ 200 ] ; storage . retrieve ( new byte [ 8 ] ) ; for ( int i = 0 ; i < 5 ; i ++ ) { storage . store ( new com . datatorrent . netlet . util . Slice ( b , 0 , b . length ) ) ; storage . store ( new com . datatorrent . netlet . util . Slice ( b , 0 , b . length ) ) ; s... | org . junit . Assert . assertArrayEquals ( lastWrittenAddress , cleanedOffset ) |
shouldFindById ( ) { when ( plan . getType ( ) ) . thenReturn ( Plan . PlanType . API ) ; when ( plan . getValidation ( ) ) . thenReturn ( Plan . PlanValidationType . AUTO ) ; when ( planRepository . findById ( io . gravitee . management . service . PlanService_FindByIdTest . PLAN_ID ) ) . thenReturn ( java . util . Op... | org . junit . Assert . assertNotNull ( planEntity ) |
testHomePageWithIFrameTool ( ) { context . checking ( new org . jmock . Expectations ( ) { { oneOf ( serverConfigurationService ) . getBoolean ( "legacyPageTitleCustom" , true ) ; will ( returnValue ( true ) ) ; one ( activeToolManager ) . getLocalizedToolProperty ( "sakai.home" , "title" ) ; will ( returnValue ( "Loca... | org . junit . Assert . assertEquals ( "Localized<sp>Home<sp>Title" , page . getTitle ( ) ) |
withClosedStart ( ) { net . time4j . PlainDate start = net . time4j . PlainDate . of ( 2014 , 2 , 27 ) ; net . time4j . PlainDate end = net . time4j . PlainDate . of ( 2014 , 5 , 14 ) ; net . time4j . range . DateInterval interval = net . time4j . range . DateInterval . between ( start , end ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertThat ( interval . withClosedStart ( ) , org . hamcrest . CoreMatchers . is ( interval ) ) |
testAutoMapOfNumberToLong ( ) { "<AssertPlaceHolder>" ; } autoMap ( java . sql . ResultSet , java . lang . Class ) { try { if ( cls . isInterface ( ) ) { return com . github . davidmoten . rx . jdbc . Util . autoMapInterface ( rs , cls ) ; } else { int n = rs . getMetaData ( ) . getColumnCount ( ) ; for ( java . lang .... | org . junit . Assert . assertEquals ( 1L , ( ( long ) ( ( java . lang . Long ) ( com . github . davidmoten . rx . jdbc . Util . autoMap ( 1 , com . github . davidmoten . rx . jdbc . Long . class ) ) ) ) ) |
testNull ( ) { "<AssertPlaceHolder>" ; } isValidModelPixelScale ( double [ ] ) { final double [ ] defaultValues = new double [ ] { 1 , 1 , 0 } ; return org . esa . beam . dataio . geotiff . Utils . isValidData ( modelTransformation , defaultValues ) ; } | org . junit . Assert . assertEquals ( false , org . esa . beam . dataio . geotiff . Utils . isValidModelPixelScale ( null ) ) |
testFocusControl_doesNotRenderBack ( ) { org . eclipse . rap . rwt . testfixture . internal . Fixture . markInitialized ( display ) ; org . eclipse . swt . widgets . Shell shell = new org . eclipse . swt . widgets . Shell ( display , org . eclipse . swt . SWT . NONE ) ; new org . eclipse . swt . widgets . Button ( shel... | org . junit . Assert . assertNull ( message . findSetOperation ( getId ( display ) , "focusControl" ) ) |
testNoError ( ) { boolean result = checkNoError ( "Social_Files_Get_My_Folders" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testCardinality ( ) { int size = 1033 ; edu . ucla . sspace . util . SparseDoubleArray arr = new edu . ucla . sspace . util . SparseDoubleArray ( ) ; for ( int i = 1 ; i < size ; ++ i ) { arr . set ( i , java . lang . Double . valueOf ( i ) ) ; "<AssertPlaceHolder>" ; } } cardinality ( ) { return indices . length ; } | org . junit . Assert . assertEquals ( i , arr . cardinality ( ) ) |
testReadWithPropLargerThanPredicate ( ) { org . gradoop . common . model . impl . properties . PropertyValue propertyValueVertexCount = org . gradoop . common . model . impl . properties . PropertyValue . create ( 3 ) ; org . gradoop . common . model . impl . properties . PropertyValue propertyValueSince = org . gradoo... | org . junit . Assert . assertTrue ( hBaseDataSource . isFilterPushedDown ( ) ) |
shouldFailIpCheckForIpWithTooManyPlayersOnline ( ) { org . bukkit . entity . Player player = fr . xephi . authme . process . login . AsynchronousLoginTest . mockPlayer ( "Ian" ) ; given ( commonService . getProperty ( RestrictionSettings . MAX_LOGIN_PER_IP ) ) . willReturn ( 2 ) ; given ( commonService . hasPermission ... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( true ) ) |
test ( ) { int [ ] nums = new int [ ] { 4 , 14 , 2 } ; "<AssertPlaceHolder>" ; } totalHammingDistance ( int [ ] ) { int len = nums . length ; int [ ] countOfOnes = new int [ 32 ] ; for ( int i = 0 ; i < len ; i ++ ) { for ( int j = 0 ; j < 32 ; j ++ ) { countOfOnes [ j ] += ( ( nums [ i ] ) > > j ) & 1 ; } } int sum = ... | org . junit . Assert . assertThat ( totalHammingDistance ( nums ) , org . hamcrest . Matchers . is ( 6 ) ) |
shouldSerizaliceAFullLoadedObjectToOriginalClass ( ) { java . lang . Object proxy = proxyFactory . createProxy ( author , new org . apache . ibatis . executor . loader . ResultLoaderMap ( ) , new org . apache . ibatis . session . Configuration ( ) , new org . apache . ibatis . reflection . factory . DefaultObjectFactor... | org . junit . Assert . assertEquals ( author . getClass ( ) , proxy2 . getClass ( ) ) |
test8 ( ) { cc . redberry . rings . poly . MultivariateRing < cc . redberry . rings . poly . multivar . MultivariatePolynomial < cc . redberry . rings . bigint . BigInteger > > ring = MultivariateRing ( 3 , cc . redberry . rings . poly . univar . Z ) ; cc . redberry . rings . io . Coder < cc . redberry . rings . poly .... | org . junit . Assert . assertEquals ( sr , rr ) |
shouldHandleStrangeClasspaths ( ) { org . infinitest . parser . ChangeDetector changeDetector = new org . infinitest . parser . FileChangeDetector ( ) ; changeDetector . setClasspathProvider ( new org . infinitest . parser . StandaloneClasspath ( new org . infinitest . parser . ArrayList < org . infinitest . parser . F... | org . junit . Assert . assertTrue ( changeDetector . findChangedFiles ( ) . isEmpty ( ) ) |
testGemmStrides ( ) { final org . nd4j . linalg . api . ndarray . INDArray X = org . nd4j . linalg . factory . Nd4j . arange ( 20 ) . reshape ( 4 , 5 ) ; for ( int i = 0 ; i < 5 ; i ++ ) { final org . nd4j . linalg . api . ndarray . INDArray xi = X . get ( org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org .... | org . junit . Assert . assertEquals ( outerProductDuped , outerProduct ) |
testBuscarPosicaoNegativa ( ) { br . com . senacrs . alp . aulas . MinhaLista < java . lang . String > obj = null ; obj = criarMinhaLista ( ) ; try { obj . buscar ( ( - 1 ) ) ; org . junit . Assert . fail ( java . lang . String . valueOf ( obj ) ) ; } catch ( java . lang . IndexOutOfBoundsException e ) { "<AssertPlaceH... | org . junit . Assert . assertTrue ( true ) |
testInDateRangeBeforeMinDate ( ) { au . gov . ga . earthsci . core . temporal . BigTime t = new au . gov . ga . earthsci . core . temporal . BigTime ( java . math . BigInteger . valueOf ( Long . MIN_VALUE ) . multiply ( BigTime . NANOS_IN_MILLISECOND ) . subtract ( BigInteger . ONE ) ) ; "<AssertPlaceHolder>" ; } isInD... | org . junit . Assert . assertFalse ( t . isInDateRange ( ) ) |
testAppendEscapedLuceneQuery ( ) { java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; java . lang . CharSequence text = "test<sp>encoding<sp>+<sp>-<sp>&<sp>|<sp>!<sp>(<sp>)<sp>{<sp>}<sp>[<sp>]<sp>^<sp>\"<sp>~<sp>*<sp>?<sp>:<sp>\\" ; java . lang . String expResult = "test<sp>encoding<sp>\\+<sp>\\-<s... | org . junit . Assert . assertEquals ( expResult , buf . toString ( ) ) |
testDeleteAttachments ( ) { org . eclipse . vorto . repository . core . IUserContext erle = org . eclipse . vorto . repository . core . impl . UserContext . user ( "erle" ) ; importModel ( "Color.type" , erle ) ; org . eclipse . vorto . model . ModelId modelId = new org . eclipse . vorto . model . ModelId ( "Color" , "... | org . junit . Assert . assertTrue ( deleteResult ) |
getByCodeWithLowerCaseAlpha2CodeShouldReturnCountry ( ) { for ( org . iban4j . CountryCode code : org . iban4j . CountryCode . values ( ) ) { org . iban4j . CountryCode newCode = org . iban4j . CountryCode . getByCode ( code . getAlpha2 ( ) . toLowerCase ( ) ) ; "<AssertPlaceHolder>" ; } } getAlpha2 ( ) { return name (... | org . junit . Assert . assertThat ( newCode , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( code ) ) ) |
createThingWithBridge ( ) { org . eclipse . smarthome . core . thing . ThingUID bridgeUID = new org . eclipse . smarthome . core . thing . ThingUID ( "binding:bridge:1" ) ; org . eclipse . smarthome . core . thing . type . ThingType thingType = org . eclipse . smarthome . core . thing . type . ThingTypeBuilder . instan... | org . junit . Assert . assertThat ( thing . getBridgeUID ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( bridgeUID ) ) ) |
testHandlerExecutor ( ) { org . webbitserver . stub . StubConnection target = new org . webbitserver . stub . StubConnection ( null ) ; java . util . concurrent . Executor actual = target . handlerExecutor ( ) ; "<AssertPlaceHolder>" ; } handlerExecutor ( ) { return this ; } | org . junit . Assert . assertEquals ( target , actual ) |
testGetUuidNull ( ) { com . adobe . cq . wcm . core . components . models . Image image = getImageUnderTest ( com . adobe . cq . wcm . core . components . internal . models . v2 . ImageImplTest . IMAGE22_PATH ) ; "<AssertPlaceHolder>" ; } getUuid ( ) { throw new java . lang . UnsupportedOperationException ( ) ; } | org . junit . Assert . assertEquals ( null , image . getUuid ( ) ) |
testQueryUsersWithAccessToApplication ( ) { org . picketlink . idm . PartitionManager partitionManager = getPartitionManager ( ) ; org . picketlink . test . idm . identitymodel . saas . model . Realm acmeRealm = getAcmeRealm ( ) ; org . picketlink . idm . IdentityManager acmeIdentityManager = partitionManager . createI... | org . junit . Assert . assertEquals ( 1 , query . getResultCount ( ) ) |
testDirMoveAlreadyExists ( ) { java . nio . file . Path sourceDir = java . nio . file . Files . createDirectory ( root . resolve ( "sourceDir" ) ) ; java . nio . file . Files . createFile ( sourceDir . resolve ( "aFile" ) ) ; java . nio . file . Path targetDir = java . nio . file . Files . createDirectory ( root . reso... | org . junit . Assert . assertTrue ( java . nio . file . Files . exists ( targetDir . resolve ( "aFile" ) ) ) |
shouldValidateWhenEntity ( ) { final uk . gov . gchq . gaffer . data . element . Element element = new uk . gov . gchq . gaffer . data . element . Entity . Builder ( ) . group ( TestGroups . ENTITY ) . build ( ) ; final boolean valid = new uk . gov . gchq . gaffer . data . IsEntityValidator ( ) . validate ( element ) ;... | org . junit . Assert . assertTrue ( valid ) |
When_fluid_set_tag_Should_set_tag ( ) { class TestSystem extends com . artemis . BaseSystem { public com . artemis . managers . TagManager tagManager ; @ com . artemis . generator . strategy . e . Override protected void processSystem ( ) { com . artemis . Entity entity = com . artemis . E . E ( ) . tag ( "test" ) . en... | org . junit . Assert . assertEquals ( "test" , tagManager . getTag ( entity ) ) |
multiplyQuantityTest ( ) { tec . units . ri . quantity . ByteQuantity < javax . measure . quantity . ElectricResistance > quantity1 = new tec . units . ri . quantity . ByteQuantity ( java . lang . Byte . valueOf ( "3" ) . byteValue ( ) , tec . units . ri . unit . Units . OHM ) ; tec . units . ri . quantity . ByteQuanti... | org . junit . Assert . assertEquals ( 6 , result . getValue ( ) ) |
testSignaleerProcesNok ( ) { final org . jboss . soa . esb . message . Message message = org . mockito . Mockito . mock ( org . jboss . soa . esb . message . Message . class ) ; final org . jboss . soa . esb . message . Properties properties = org . mockito . Mockito . mock ( org . jboss . soa . esb . message . Propert... | org . junit . Assert . assertSame ( message , result ) |
testInitializeFailureOnGetActiveRanges ( ) { org . apache . bookkeeper . clients . exceptions . ClientException cause = new org . apache . bookkeeper . clients . exceptions . ClientException ( "test-cause" ) ; when ( mockMetaRangeClient . getActiveDataRanges ( ) ) . thenReturn ( org . apache . bookkeeper . common . con... | org . junit . Assert . assertEquals ( cause , e ) |
testMaxRows ( ) { org . eclipse . birt . data . oda . pojo . querymodel . PojoQuery query = org . eclipse . birt . data . oda . pojo . testutil . PojoQueryCreator . createWithA1tonMap ( ) ; java . util . List < org . eclipse . birt . data . oda . pojo . input . pojos . Teacher > ts = org . eclipse . birt . data . oda .... | org . junit . Assert . assertEquals ( maxRows , rowCount ) |
testVerifyWithInvalidKeyChooserFails ( ) { byte [ ] signature = signer . sign ( com . springcryptoutils . core . signature . SignerAndVerifierWithChoosersByAliasImplTest . keyStoreChooser , com . springcryptoutils . core . signature . SignerAndVerifierWithChoosersByAliasImplTest . privateKeyChooserByAlias , message ) ;... | org . junit . Assert . assertNotNull ( signature ) |
checkIsNetcoolTrue ( ) { "<AssertPlaceHolder>" ; } checkIsNetcool ( java . lang . String ) { return dbType . equalsIgnoreCase ( io . cloudslang . content . database . utils . NETCOOL_DB_TYPE ) ; } | org . junit . Assert . assertTrue ( checkIsNetcool ( io . cloudslang . content . database . utils . NETCOOL_DB_TYPE ) ) |
simple ( ) { com . asakusafw . workflow . model . basic . BasicJobflowInfo jobflow = new com . asakusafw . workflow . model . basic . BasicJobflowInfo ( context . getFlowId ( ) ) ; jobflow . addTask ( TaskInfo . Phase . MAIN , new com . asakusafw . workflow . executor . MockTaskInfo ( "A" ) ) ; com . asakusafw . workfl... | org . junit . Assert . assertThat ( e0 . getValues ( ) , contains ( "A" ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.