input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testTessBaseAPIGetInitLanguagesAsString ( ) { net . sourceforge . tess4j . TessAPI1Test . logger . info ( "TessBaseAPIGetInitLanguagesAsString" ) ; java . lang . String expResult = "" ; java . lang . String result = net . sourceforge . tess4j . TessAPI1 . TessBaseAPIGetInitLanguagesAsString ( handle ) ; "<AssertPlaceHo... | org . junit . Assert . assertEquals ( expResult , result ) |
testArrayUpsertIntWithNulls ( ) { org . apache . phoenix . end2end . Connection conn = org . apache . phoenix . end2end . DriverManager . getConnection ( getUrl ( ) ) ; java . lang . String t1 = generateUniqueName ( ) ; conn . createStatement ( ) . execute ( ( ( "CREATE<sp>TABLE<sp>" + t1 ) + "<sp>(<sp>k<sp>VARCHAR<sp>... | org . junit . Assert . assertEquals ( rs . getArray ( 1 ) , array ) |
itMightNotHaveABalance ( ) { inject ( com . wesabe . api . accounts . entities . Account . class , account , "balance" , null ) ; "<AssertPlaceHolder>" ; } getBalance ( ) { return balance ; } | org . junit . Assert . assertNull ( account . getBalance ( ) ) |
testStartRecordingCallback ( ) { java . util . concurrent . atomic . AtomicInteger startRecordingCallbackInvocations = new java . util . concurrent . atomic . AtomicInteger ( ) ; testSubject . registerStartRecordingCallback ( startRecordingCallbackInvocations :: incrementAndGet ) ; testSubject . startRecording ( ) ; "<... | org . junit . Assert . assertThat ( startRecordingCallbackInvocations . get ( ) , equalTo ( 1 ) ) |
whenWeAddMuchLeafIntoSimpleTreeThatItShouldBeUnbalance ( ) { ru . szhernovoy . tree . SimpleTreeWithSearch < java . lang . Integer > simple = new ru . szhernovoy . tree . SimpleTreeWithSearch ( ) ; simple . addChild ( new ru . szhernovoy . tree . Leaf < java . lang . Integer > ( ) , 1 ) ; simple . addChild ( new ru . s... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( false ) ) |
producerThrowsNoBrokerException ( ) { java . util . Properties props = new java . util . Properties ( ) ; props . put ( "broker.list" , "placeholder" ) ; com . leansoft . luxun . producer . ProducerConfig config = new com . leansoft . luxun . producer . ProducerConfig ( props ) ; com . leansoft . luxun . producer . IPa... | org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( "the_topic" ) ) |
convert_iterator_to_list_java8 ( ) { java . util . Iterator < java . lang . String > iteratorToCollection = com . levelup . java . collections . ConvertIteratorToArrayList . collection . iterator ( ) ; java . util . List < java . lang . String > convertedIterator = java . util . stream . StreamSupport . stream ( java .... | org . junit . Assert . assertTrue ( ( ( convertedIterator . size ( ) ) == 4 ) ) |
testRenderDataUnchanged ( ) { registerDataKeys ( new java . lang . String [ ] { "foo" } ) ; expandItem . setData ( "foo" , "string" ) ; org . eclipse . rap . rwt . testfixture . internal . Fixture . markInitialized ( display ) ; org . eclipse . rap . rwt . testfixture . internal . Fixture . markInitialized ( expandItem... | org . junit . Assert . assertEquals ( 0 , message . getOperationCount ( ) ) |
mergeAddsPropertiesFromEnvironmentVariablesWithPrefix ( ) { envProperties = org . gradle . util . GUtil . map ( ( ( IGradlePropertiesLoader . ENV_PROJECT_PROPERTIES_PREFIX ) + "envProp" ) , "env<sp>value" , "ignoreMe" , "ignored" ) ; gradlePropertiesLoader . loadProperties ( settingsDir , startParameter , systemPropert... | org . junit . Assert . assertEquals ( "env<sp>value" , properties . get ( "envProp" ) ) |
testAccessUpdateServiceWithoutRights ( ) { net . maritimecloud . identityregistry . model . database . entities . Service service = new net . maritimecloud . identityregistry . model . database . entities . Service ( ) ; service . setMrn ( "urn:mrn:mcl:service:instance:dma:nw-nm" ) ; service . setName ( "/oidc/api/org/... | org . junit . Assert . assertTrue ( false ) |
testDefaultMessageTemplate ( ) { load ( io . github . tcdl . msb . autoconfigure . MsbAutoConfigurationTest . EmptyConfiguration . class ) ; io . github . tcdl . msb . api . MessageTemplate messageTemplate = this . context . getBean ( io . github . tcdl . msb . api . MessageTemplate . class ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertNotNull ( messageTemplate ) |
find ( ) { com . braintreegateway . integrationtest . Customer customer = gateway . customer ( ) . create ( new com . braintreegateway . integrationtest . CustomerRequest ( ) ) . getTarget ( ) ; com . braintreegateway . integrationtest . Customer foundCustomer = gateway . customer ( ) . find ( customer . getId ( ) ) ; ... | org . junit . Assert . assertEquals ( customer . getId ( ) , foundCustomer . getId ( ) ) |
testGetXmlProlog_UppercaseResult ( ) { final java . io . InputStream input = com . rometools . rome . io . XmlReaderTest . stringToStream ( "<?xml<sp>encoding=\"utf-8\"?>" , "UTF-8" ) ; final java . lang . String guessedEncoding = "UTF-8" ; "<AssertPlaceHolder>" ; } getXmlProlog ( java . io . InputStream , java . lang ... | org . junit . Assert . assertEquals ( "UTF-8" , com . rometools . rome . io . XmlReader . getXmlProlog ( input , guessedEncoding ) ) |
testJsonForCommons ( ) { "<AssertPlaceHolder>" ; } getJsonDatatypeFromDatatypeIri ( java . lang . String ) { switch ( datatypeIri ) { case org . wikidata . wdtk . datamodel . interfaces . DatatypeIdValue . DT_ITEM : return org . wikidata . wdtk . datamodel . implementation . DatatypeIdImpl . JSON_DT_ITEM ; case org . w... | org . junit . Assert . assertEquals ( org . wikidata . wdtk . datamodel . implementation . DatatypeIdImpl . getJsonDatatypeFromDatatypeIri ( DatatypeIdImpl . DT_COMMONS_MEDIA ) , DatatypeIdImpl . JSON_DT_COMMONS_MEDIA ) |
testBigIntegerToBytesNegative ( ) { byte [ ] expecteds = new byte [ ] { ( ( byte ) ( 255 ) ) , 0 , 19 , ( ( byte ) ( 136 ) ) } ; java . math . BigInteger b = java . math . BigInteger . valueOf ( ( - 16772216 ) ) ; byte [ ] actuals = org . ethereum . util . ByteUtil . bigIntegerToBytes ( b ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertArrayEquals ( expecteds , actuals ) |
testUnmarshalWithKnownMetacardType ( ) { ddf . catalog . data . MetacardType knownMetacardType = new ddf . catalog . data . impl . MetacardTypeImpl ( ddf . catalog . transform . xml . adapter . MetacardTypeAdapterTest . KNOWN_TYPE_NAME , ( ( java . util . Set < ddf . catalog . data . AttributeDescriptor > ) ( null ) ) ... | org . junit . Assert . assertThat ( metacardType . getName ( ) , org . hamcrest . CoreMatchers . is ( knownMetacardType . getName ( ) ) ) |
checkNotenoughData ( ) { org . apache . mina . http2 . impl . BytePartialDecoder decoder = new org . apache . mina . http2 . impl . BytePartialDecoder ( 4 ) ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . wrap ( new byte [ ] { 0 , 0 } ) ; "<AssertPlaceHolder>" ; } consume ( java . nio . ByteBuffer ) { whil... | org . junit . Assert . assertFalse ( decoder . consume ( buffer ) ) |
checkNullPasswords ( ) { final char [ ] testPassword = null ; final java . lang . String encryptedPassword = encryptor . encryptPassword ( testPassword ) ; "<AssertPlaceHolder>" ; } checkPassword ( char [ ] , java . lang . String ) { try { return newPasswordEncryptor . checkPassword ( plainPassword , encryptedPassword ... | org . junit . Assert . assertThat ( encryptor . checkPassword ( testPassword , encryptedPassword ) , org . hamcrest . core . Is . is ( true ) ) |
getReportingUnitsShouldReturnMm ( ) { target . rawResponseListener ( "$13=0" ) ; "<AssertPlaceHolder>" ; } getReportingUnits ( ) { if ( isReportingUnits ( ) ) { if ( "0" . equals ( value ) ) { return UnitUtils . Units . MM ; } else if ( "1" . equals ( value ) ) { return UnitUtils . Units . INCH ; } } return UnitUtils .... | org . junit . Assert . assertEquals ( UnitUtils . Units . MM , target . getReportingUnits ( ) ) |
contents_of_multi_dimensional_arrays_are_populated ( ) { com . flextrade . jfixture . JFixture fixture = new com . flextrade . jfixture . JFixture ( ) ; int [ ] [ ] multiArray = fixture . create ( int [ ] [ ] . class ) ; for ( int [ ] innerArray : multiArray ) { for ( int innerInnerArray : innerArray ) { "<AssertPlaceH... | org . junit . Assert . assertTrue ( ( innerInnerArray > 0 ) ) |
contentTypeServiceDocumentXml ( ) { final org . apache . http . HttpResponse response = callUri ( "" , HttpHeaders . ACCEPT , HttpContentType . APPLICATION_XML , HttpStatusCodes . OK ) ; checkMediaType ( response , HttpContentType . APPLICATION_XML_UTF8 ) ; "<AssertPlaceHolder>" ; } getBody ( org . apache . http . Http... | org . junit . Assert . assertTrue ( ( ( getBody ( response ) . length ( ) ) > 100 ) ) |
testImplement ( ) { final com . cloud . network . dao . PhysicalNetworkVO physnet = mock ( com . cloud . network . dao . PhysicalNetworkVO . class ) ; when ( physnetdao . findById ( ( ( java . lang . Long ) ( any ( ) ) ) ) ) . thenReturn ( physnet ) ; when ( physnet . getIsolationMethods ( ) ) . thenReturn ( java . uti... | org . junit . Assert . assertTrue ( ( implementednetwork != null ) ) |
testDecode ( ) { com . xiongyingqi . qrcode . QRCode qrCode = new com . xiongyingqi . qrcode . QRCode ( ) ; com . xiongyingqi . qrcode . File file = qrCode . encode ( profile ) ; System . out . println ( ( ":<sp>" + file ) ) ; java . lang . String decode = qrCode . decode ( file . getPath ( ) ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertEquals ( decode , profile . getContent ( ) ) |
testNonCompilingBreakingConsequences ( ) { java . lang . String str = "<sp>break[t1]\n" 0 + ( ( ( ( ( ( ( ( ( ( "<sp>break[t1]\n" 2 + "\n" ) + "rule<sp>R1<sp>when\n" ) + "<sp>$a:<sp>Cheese<sp>(<sp>type<sp>==<sp>\"stilton\"<sp>)\n" ) + "<sp>break[t1]\n" ) + "<sp>$b:<sp>Cheese<sp>(<sp>type<sp>==<sp>\"cheddar\"<sp>)\n" ) ... | org . junit . Assert . assertTrue ( kbuilder . hasErrors ( ) ) |
shouldRejectWhenTicketIsNotNull ( ) { org . openstack . atlas . docs . loadbalancers . api . management . v1 . Ticket ticket = new org . openstack . atlas . docs . loadbalancers . api . management . v1 . Ticket ( ) ; ticket . setTicketId ( "1234" ) ; ticket . setComment ( "My<sp>first<sp>comment!" ) ; rateLimit . setTi... | org . junit . Assert . assertFalse ( result . passedValidation ( ) ) |
testCreateConnectionAsUnknwonUser ( ) { java . net . URI brokerURI = new java . net . URI ( ( ( getAmqpFailoverURI ( ) ) + "?failover.maxReconnectAttempts=5" ) ) ; org . apache . qpid . jms . JmsConnectionFactory factory = new org . apache . qpid . jms . JmsConnectionFactory ( brokerURI ) ; factory . setUsername ( "unk... | org . junit . Assert . assertNotNull ( connection ) |
testCreatePullsFromFieldsRetrieveNothingFromEmptyObject ( ) { org . uma . jmetal . util . measure . impl . MeasureFactory factory = new org . uma . jmetal . util . measure . impl . MeasureFactory ( ) ; java . util . Map < java . lang . String , org . uma . jmetal . util . measure . PullMeasure < ? > > measures = factor... | org . junit . Assert . assertTrue ( measures . toString ( ) , measures . isEmpty ( ) ) |
testCreateNewFile ( ) { java . io . File f = new java . io . File ( trash , "x" ) ; org . eclipse . jgit . util . FileUtils . createNewFile ( f ) ; "<AssertPlaceHolder>" ; try { org . eclipse . jgit . util . FileUtils . createNewFile ( f ) ; org . junit . Assert . fail ( "creation<sp>of<sp>already<sp>existing<sp>file<s... | org . junit . Assert . assertTrue ( f . exists ( ) ) |
testGetParseLanguageMt ( ) { System . out . println ( "getParseLanguageMt" ) ; org . opencyc . api . NLFormat instance = org . opencyc . api . NLFormat . getInstance ( org . opencyc . api . NLFormatTest . cyc ) ; java . lang . Object result = instance . getParseLanguageMt ( ) ; "<AssertPlaceHolder>" ; } getParseLanguag... | org . junit . Assert . assertNotNull ( result ) |
testFilter ( ) { final org . apache . calcite . tools . PigRelBuilder builder = org . apache . calcite . tools . PigRelBuilder . create ( org . apache . calcite . test . PigRelBuilderTest . config ( ) . build ( ) ) ; final org . apache . calcite . rel . RelNode root = builder . load ( "EMP.csv" , null , null ) . filter... | org . junit . Assert . assertThat ( str ( root ) , org . hamcrest . CoreMatchers . is ( plan ) ) |
__A$VoidFunction1 ( ) { com . m3 . scalaflavor4j . CollectionLike < java . lang . String > xs1 = com . m3 . scalaflavor4j . Seq . apply ( "a" , "b" ) ; com . m3 . scalaflavor4j . CollectionLike < java . lang . Integer > xs2 = com . m3 . scalaflavor4j . Seq . apply ( 1 , 2 , 3 , 4 , 5 ) ; com . m3 . scalaflavor4j . Coll... | org . junit . Assert . assertThat ( c . count , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 20 ) ) ) |
scalarSubQueryInClause2 ( ) { com . querydsl . sql . SQLSerializer serializer = new com . querydsl . sql . SQLSerializer ( Configuration . DEFAULT ) ; serializer . handle ( this . query ( ) . from ( employee ) . where ( com . querydsl . sql . SQLExpressions . select ( employee . firstname ) . from ( employee ) . orderB... | org . junit . Assert . assertEquals ( expectedQuery , serializer . toString ( ) ) |
AccessEnumerationInner ( ) { java . lang . String fromClass = "Domain.Direct.Violating.AccessInnerEnumeration" ; java . lang . String toClass = "Technology.Direct.Dao.CallInstanceOuterClassDAO.InnerEnumeration" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . ... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , false ) ) |
createPrivChatShouldNotSetAndroidPrivateChatWindowIfAlreadySet ( ) { final net . usikkert . kouchat . ui . PrivateChatWindow privchat = mock ( net . usikkert . kouchat . ui . PrivateChatWindow . class ) ; testUser . setPrivchat ( privchat ) ; androidUserInterface . createPrivChat ( testUser ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertSame ( privchat , testUser . getPrivchat ( ) ) |
canAddNewSessionAndRetrieveById ( ) { org . openqa . selenium . remote . server . ActiveSessions sessions = new org . openqa . selenium . remote . server . ActiveSessions ( 10 , MINUTES ) ; org . openqa . selenium . grid . session . ActiveSession session = org . mockito . Mockito . mock ( org . openqa . selenium . grid... | org . junit . Assert . assertEquals ( session , sessions . get ( id ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . marketplace . model . Module newModule = addModule ( ) ; com . liferay . marketplace . model . Module existingModule = _persistence . fetchByPrimaryKey ( newModule . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; } | org . junit . Assert . assertEquals ( existingModule , newModule ) |
layoutMarshallerSubColumns ( ) { java . lang . String expected = org . uberfire . ext . layout . editor . impl . LayoutServicesImplTest . loadSample ( "SubColumnsLayout.txt" ) ; org . uberfire . ext . layout . editor . api . editor . LayoutTemplate template = layoutServices . convertLayoutFromString ( expected ) ; java... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldDetectInvalidGroupReference ( ) { final ro . isdc . wro . model . WroModel model = loadModelFromLocation ( "shouldDetectInvalidGroupReference.xml" ) ; "<AssertPlaceHolder>" ; } getGroups ( ) { return java . util . Collections . unmodifiableSet ( groups ) ; } | org . junit . Assert . assertTrue ( model . getGroups ( ) . isEmpty ( ) ) |
shouldEvaluateFalseIfIncludeAndExcludeAreEmptyButPredicateReturnsFalse ( ) { java . util . function . Predicate < java . lang . Class < ? > > inner = mock ( java . util . function . Predicate . class ) ; java . util . Set < com . oracle . bedrock . testsupport . junit . options . TestClasses . TestMatcher > includes = ... | org . junit . Assert . assertThat ( predicate . test ( com . oracle . bedrock . testsupport . junit . options . Integer . class ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testNormal02 ( ) { int port = org . fluentd . logger . util . MockFluentd . randomPort ( ) ; final org . fluentd . logger . sender . List < org . fluentd . logger . sender . Event > elist = new org . fluentd . logger . sender . ArrayList < org . fluentd . logger . sender . Event > ( ) ; org . fluentd . logger . util . ... | org . junit . Assert . assertEquals ( count , elist . size ( ) ) |
correct_gemeente_einde_is_voortzettende_gemeente ( ) { when ( bericht . getEntiteitVoorObjectSleutel ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingPersoon . class , "1" ) ) . thenReturn ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingPersoon . decorate ( new nl . bzk . algemeenbrp . dal . dome... | org . junit . Assert . assertEquals ( 0 , meldingElements . size ( ) ) |
testMetaInfAccessible ( ) { java . lang . ClassLoader cl = java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) ; java . net . URL manifestResource = cl . getResource ( "META-INF/example.txt" ) ; "<AssertPlaceHolder>" ; } getResource ( java . lang . Object ) { return org . wildfly . transaction . client... | org . junit . Assert . assertNotNull ( manifestResource ) |
testNullExceptionPassing ( ) { exceptionContext = new org . apache . commons . lang3 . exception . ContextedException ( TEST_MESSAGE_2 , new java . lang . Exception ( TEST_MESSAGE ) , null ) . addContextValue ( "test1" , null ) . addContextValue ( "test2" , "some<sp>value" ) . addContextValue ( "test<sp>Date" , new jav... | org . junit . Assert . assertTrue ( ( message != null ) ) |
detect_executionException ( ) { try { this . classUnderTest ( ) . detect ( ( each ) -> { throw new java . lang . RuntimeException ( "Execution<sp>exception" ) ; } ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } } detect ( com . gs . collections . api . block . predicate . Predicate ) { sync... | org . junit . Assert . assertEquals ( "Execution<sp>exception" , e . getMessage ( ) ) |
testNoAdditionalWrap ( ) { final int noWrapping = 0 ; final java . util . List < java . lang . String > unwrappedLines = com . sonyericsson . jenkins . plugins . bfa . tokens . TokenUtils . wrap ( com . sonyericsson . jenkins . plugins . bfa . tokens . TokenUtilsTest . TEST_TEXT , noWrapping ) ; System . out . println ... | org . junit . Assert . assertEquals ( expectedNoWrappingLineCount , unwrappedLines . size ( ) ) |
testBoolean ( ) { java . lang . Class < com . j256 . ormlite . field . types . BooleanTypeTest . LocalBoolean > clazz = com . j256 . ormlite . field . types . BooleanTypeTest . LocalBoolean . class ; com . j256 . ormlite . dao . Dao < com . j256 . ormlite . field . types . BooleanTypeTest . LocalBoolean , java . lang .... | org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) ) |
noPlanForNodeTypeQueryAndOnlyAnalyzedProperties ( ) { org . apache . jackrabbit . oak . spi . state . NodeBuilder defn = newLucenePropertyIndexDefinition ( builder , "test" , of ( "foo" ) , "async" ) ; defn . setProperty ( FulltextIndexConstants . EVALUATE_PATH_RESTRICTION , true ) ; defn . setProperty ( IndexConstants... | org . junit . Assert . assertNull ( plan ) |
testAvoidZeroWeight ( ) { hivemall . ftvec . trans . VectorizeFeaturesUDF udf = new hivemall . ftvec . trans . VectorizeFeaturesUDF ( ) ; org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspector [ ] argOIs = new org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspector [ 3 ] ; java . ut... | org . junit . Assert . assertEquals ( expected , actuals ) |
shouldLoadAllVisibilityPropertiesWhenGetVisProperty ( ) { final java . lang . String group = uk . gov . gchq . gaffer . commonutil . TestGroups . EDGE ; final org . apache . accumulo . core . data . Key key = mock ( org . apache . accumulo . core . data . Key . class ) ; final org . apache . accumulo . core . data . Va... | org . junit . Assert . assertEquals ( "vis1" , property ) |
testGetIndex ( ) { co . nubetech . hiho . mapreduce . lib . db . ColumnInfo cInfo = new co . nubetech . hiho . mapreduce . lib . db . ColumnInfo ( 1 , java . sql . Types . INTEGER , "name" ) ; "<AssertPlaceHolder>" ; } getIndex ( ) { return index ; } | org . junit . Assert . assertEquals ( 1 , cInfo . getIndex ( ) ) |
testCorrectAxiomsRDFSClass ( ) { org . semanticweb . owlapi . model . OWLOntology ont = ontologyFromClasspathFile ( "RDFSClass.rdf" ) ; org . semanticweb . owlapi . api . test . fileroundtrip . IRI clsIRI = IRI ( "http://owlapi.sourceforge.net/ontology#" , "ClsA" ) ; org . semanticweb . owlapi . model . OWLClass cls = ... | org . junit . Assert . assertTrue ( ont . containsAxiom ( ax ) ) |
getsAllColumnHeadings ( ) { bot . checkBox ( "Multiple<sp>Columns" ) . select ( ) ; tree = bot . treeInGroup ( "Tree" ) ; java . util . ArrayList < java . lang . String > arrayList = new java . util . ArrayList < java . lang . String > ( ) ; arrayList . add ( "Name" ) ; arrayList . add ( "Type" ) ; arrayList . add ( "S... | org . junit . Assert . assertEquals ( arrayList , tree . columns ( ) ) |
testBrowse ( ) { com . dd . plist . NSArray array = org . robovm . libimobiledevice . InstallationProxyClientTest . client . browse ( ) ; com . dd . plist . NSDictionary safari = null ; for ( int i = 0 ; i < ( array . count ( ) ) ; i ++ ) { com . dd . plist . NSDictionary dict = ( ( com . dd . plist . NSDictionary ) ( ... | org . junit . Assert . assertNotNull ( safari ) |
withUnknownResultType ( ) { try { org . springframework . integration . xquery . transformer . XQueryTransformer transformer = new org . springframework . integration . xquery . transformer . XQueryTransformer ( ) ; transformer . setExecutor ( getExecutor ( "//hello" ) ) ; transformer . setResultType ( getClass ( ) ) ;... | org . junit . Assert . assertEquals ( ( "Valid<sp>values<sp>for<sp>the<sp>result<sp>type<sp>class<sp>is<sp>String,<sp>Boolean,<sp>Number<sp>or<sp>Node,<sp>" + "for<sp>any<sp>other<sp>type,<sp>provide<sp>a<sp>custom<sp>implementation<sp>of<sp>XQueryResultMapper" ) , e . getMessage ( ) ) |
shouldReturnNullWhenExtractingUuuidFromRandomString ( ) { java . lang . String uuid = org . unitedinternet . cosmo . dao . external . UuidExternalGenerator . get ( ) . extractUuid ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return org . apache . commons . lang . bui... | org . junit . Assert . assertNull ( uuid ) |
testLoadViewStringUriWithoutType ( ) { org . kitesdk . data . DatasetDescriptor descriptor = new org . kitesdk . data . DatasetDescriptor . Builder ( ) . schemaUri ( "resource:schema/user.avsc" ) . build ( ) ; org . kitesdk . data . spi . Constraints constraints = new org . kitesdk . data . spi . Constraints ( descript... | org . junit . Assert . assertEquals ( userAndEmailView , view ) |
itShouldReturnMonthDifference ( ) { java . lang . String dateInString1 = "2011-02-01" ; java . util . Date date1 = new java . text . SimpleDateFormat ( "yyyy-MM-dd" ) . parse ( dateInString1 ) ; java . lang . String dateInString2 = "2010-02-01" ; java . util . Date date2 = new java . text . SimpleDateFormat ( "yyyy-MM-... | org . junit . Assert . assertEquals ( monthDifference , new java . lang . Integer ( 12 ) ) |
testCreateJdbcConnectionFactoryWithoutHs2UserSpecifiedInitializesConnectionUsernameProperly ( ) { when ( sqoopOptions . getHs2User ( ) ) . thenReturn ( null ) ; java . lang . String expectedUsername = org . apache . hadoop . security . UserGroupInformation . getLoginUser ( ) . getUserName ( ) ; org . apache . sqoop . h... | org . junit . Assert . assertEquals ( expectedUsername , connectionFactory . getUsername ( ) ) |
testRendererContainsUpdatesCount ( ) { for ( int updates = 0 ; updates < ( org . openehealth . ipf . commons . test . performance . throughput . AbstractThroughputStatisticsTest . UPDATES_COUNT ) ; updates ++ ) { getStatistics ( ) . update ( org . openehealth . ipf . commons . test . performance . PerformanceMeasuremen... | org . junit . Assert . assertTrue ( report . contains ( java . lang . String . valueOf ( org . openehealth . ipf . commons . test . performance . throughput . AbstractThroughputStatisticsTest . UPDATES_COUNT ) ) ) |
selectMapOnValue ( ) { org . eclipse . collections . api . map . MutableMap < java . lang . String , java . lang . String > map = org . eclipse . collections . impl . map . mutable . UnifiedMap . newWithKeysValues ( "1" , "2" , "2" , "1" , "3" , "3" ) ; org . eclipse . collections . api . map . MutableMap < java . lang... | org . junit . Assert . assertEquals ( org . eclipse . collections . impl . map . mutable . UnifiedMap . newWithKeysValues ( "2" , "1" ) , resultMap ) |
test02 ( ) { javax . sql . DataSource ds = DatasourceConfig . DATA_SOURCES . get ( "-" 4 ) ; com . alibaba . otter . canal . client . adapter . es . test . sync . Common . sqlExe ( ds , "-" 2 ) ; com . alibaba . otter . canal . client . adapter . support . Dml dml = new com . alibaba . otter . canal . client . adapter ... | org . junit . Assert . assertEquals ( "admin2" , response . getSource ( ) . get ( "-" 1 ) ) |
testGetLastValidSubscriptionId_ChangedWhenActive ( ) { org . oscm . billingservice . business . calculation . revenue . SubscriptionHistoryEvaluator subHistoryEvaluator = newSubHistoryEvaluator ( newSubscriptionHistory ( 2L , SubscriptionStatus . ACTIVE , ModificationType . MODIFY , "subIdChanged" , 15 ) , newSubscript... | org . junit . Assert . assertEquals ( "subIdChanged" , result ) |
testInstallViewInstance_validatorFail ( ) { org . apache . ambari . server . view . ViewRegistry registry = org . apache . ambari . server . view . ViewRegistry . getInstance ( ) ; java . util . Properties properties = new java . util . Properties ( ) ; properties . put ( "p1" , "v1" ) ; org . apache . ambari . server ... | org . junit . Assert . assertTrue ( viewInstanceDefinitions . isEmpty ( ) ) |
testParseSimpleWithDecimals ( ) { java . lang . String source = ( ( ( "1" + ( getDecimalCharacter ( ) ) ) + "23<sp>+<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "43i" ; org . apache . commons . math3 . complex . Complex expected = new org . apache . commons . math3 . complex . Complex ( 1.23 , 1.43 ) ; org . apache . com... | org . junit . Assert . assertEquals ( expected , actual ) |
mpAnalyzerTest ( ) { this . jCas . reset ( ) ; tokenBuilder = new org . apache . uima . fit . testing . factory . TokenBuilder < org . cleartk . token . type . Token , org . cleartk . token . type . Sentence > ( org . cleartk . token . type . Token . class , org . cleartk . token . type . Sentence . class , "pos" , "st... | org . junit . Assert . assertEquals ( expected , actual ) |
testBadState ( ) { final javax . validation . Validator validator = org . opennms . netmgt . xml . event . EventValidationTest . factory . getValidator ( ) ; final org . opennms . netmgt . xml . event . Event event = new org . opennms . netmgt . xml . event . Event ( ) ; event . setSource ( "tests" ) ; event . setTime ... | org . junit . Assert . assertEquals ( 2 , errors . size ( ) ) |
testVoornaamAfwezigBijWijzigingIndicatie_blijftJa ( ) { final nl . bzk . brp . bijhouding . bericht . model . RegistratieGeslachtsnaamVoornaamActieElement actie = maakActie ( true , true , false , 20120101 , false , null ) ; final java . util . List < nl . bzk . brp . bijhouding . bericht . model . MeldingElement > mel... | org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) ) |
testBothEmpty ( ) { barrysw19 . calculon . engine . CompoundIterator < java . lang . String > iter = new barrysw19 . calculon . engine . CompoundIterator ( new java . util . ArrayList ( ) . iterator ( ) , new java . util . ArrayList ( ) . iterator ( ) ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return ( ( iterators . l... | org . junit . Assert . assertFalse ( iter . hasNext ( ) ) |
testPrune2 ( ) { org . apromore . canoniser . bpmn . bpmn . BpmnDefinitions definitions = org . apromore . canoniser . bpmn . bpmn . BpmnDefinitions . newInstance ( new java . io . FileInputStream ( com . processconfiguration . ConfigurationAlgorithmUnitTest . test1File ) , true ) ; com . processconfiguration . TProces... | org . junit . Assert . assertTrue ( ( airbus != ( process . getFlowElement ( ) . get ( 0 ) . getValue ( ) ) ) ) |
hasNextReturnsTrue ( ) { final com . microsoft . azure . sdk . iot . provisioning . service . contract . ContractApiHttp contractApiHttp = mockedContractApiHttp ; final java . lang . String targetPath = "enrollments" ; final tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . QuerySpecificatio... | org . junit . Assert . assertTrue ( query . hasNext ( ) ) |
methodWithPartitionKeyArgument ( ) { com . hazelblast . client . impl . ProxyProviderImpl proxyProvider = new com . hazelblast . client . impl . ProxyProviderImpl ( com . hazelblast . client . impl . LoadBalanced_Test . hazelcastInstance ) ; com . hazelblast . client . impl . LoadBalanced_Test . LoadBalancedMethodWitho... | org . junit . Assert . assertNotNull ( p ) |
subSingleBenchmarkConfig ( ) { org . optaplanner . benchmark . api . PlannerBenchmarkFactory plannerBenchmarkFactory = org . optaplanner . benchmark . api . PlannerBenchmarkFactory . createFromXmlResource ( "org/optaplanner/benchmark/api/testdataPlannerBenchmarkConfig.xml" ) ; org . optaplanner . benchmark . config . S... | org . junit . Assert . assertNotNull ( plannerBenchmark ) |
equalsSameCountReturnsTrue ( ) { com . rackspacecloud . blueflood . types . BluefloodCounterRollup a = new com . rackspacecloud . blueflood . types . BluefloodCounterRollup ( ) . withCount ( 1 ) ; com . rackspacecloud . blueflood . types . BluefloodCounterRollup b = new com . rackspacecloud . blueflood . types . Bluefl... | org . junit . Assert . assertTrue ( a . equals ( b ) ) |
testConstructor ( ) { org . openhealthtools . mdht . uml . cda . ccd . operations . FunctionalStatusObservationOperations obj = new org . openhealthtools . mdht . uml . cda . ccd . operations . FunctionalStatusObservationOperations ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
selInfo_nodeValid_noBoardServiceFound ( ) { com . vmware . vrack . hms . rest . services . ServerRestServiceTest . insertNodeInNodeMap ( com . vmware . vrack . hms . rest . services . ServerRestServiceTest . getServerNode ( ) ) ; com . vmware . vrack . hms . rest . services . ServerRestServiceTest . addBoardServiceForN... | org . junit . Assert . assertNotNull ( selInfo ) |
CallConstructorLibraryClass ( ) { java . lang . String fromClass = "Domain.Direct.Violating.CallConstructorLibraryClass" ; java . lang . String toClass = "FI.Foyt.Foursquare.Api.FoursquareApi" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typ... | org . junit . Assert . assertFalse ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , false ) ) |
setPagination ( ) { org . openqa . selenium . WebDriver webDriver = getDriver ( ) ; org . openqa . selenium . WebElement row = webDriver . findElement ( org . mycore . common . selenium . util . MCRBy . partialText ( "perthes_1855_0001.jpg" ) ) . findElement ( org . openqa . selenium . By . xpath ( "ancestor::tr" ) ) ;... | org . junit . Assert . assertNotNull ( row . findElement ( org . mycore . common . selenium . util . MCRBy . partialText ( org . mycore . mets . webtest . PaginationIT . TEST_STRING ) ) ) |
testBasicConnection ( ) { org . apache . type_substitution . CarDealer dealer = getCardealer ( ) ; org . apache . type_substitution . Porsche oldCar = new org . apache . type_substitution . Porsche ( ) ; oldCar . setMake ( "Porsche" ) ; oldCar . setColor ( "Get<sp>the<sp>wrong<sp>car!" 0 ) ; oldCar . setModel ( "GT2000... | org . junit . Assert . assertNotNull ( newCar ) |
testMainForArchName ( ) { java . io . PrintStream out = System . out ; try { java . io . ByteArrayOutputStream buf = new java . io . ByteArrayOutputStream ( ) ; java . io . PrintStream tmpOut = new java . io . PrintStream ( buf ) ; java . lang . System . setOut ( tmpOut ) ; org . sqlite . util . OSInfo . main ( new jav... | org . junit . Assert . assertEquals ( org . sqlite . util . OSInfo . getArchName ( ) , buf . toString ( ) ) |
testIsGatewayPersistentWhenPersistenceIsNotEnabled ( ) { final com . gemstone . gemfire . cache . util . Gateway mockGateway = mockContext . mock ( com . gemstone . gemfire . cache . util . Gateway . class , "Gateway" ) ; final com . gemstone . gemfire . cache . util . GatewayQueueAttributes mockQueueAttributes = mockC... | org . junit . Assert . assertFalse ( function . isPersistent ( mockGateway ) ) |
testOrElseThrowWithPresentValue ( ) { int value = com . annimon . stream . Optional . of ( 10 ) . orElseThrow ( ) ; "<AssertPlaceHolder>" ; } orElseThrow ( ) { if ( ( value ) == null ) { throw new java . util . NoSuchElementException ( "No<sp>value<sp>present" ) ; } return value ; } | org . junit . Assert . assertEquals ( 10 , value ) |
isolation_01 ( ) { org . apache . jena . sparql . core . DatasetGraph dsg = create ( ) ; org . apache . jena . system . ThreadAction other = org . apache . jena . system . ThreadTxn . threadTxnRead ( dsg , ( ) -> "<AssertPlaceHolder>" ) ; dsg . begin ( org . apache . jena . sparql . transaction . WRITE ) ; dsg . add ( ... | org . junit . Assert . assertTrue ( dsg . isEmpty ( ) ) |
getDateParametricValuesInBuckets ( ) { final java . lang . String fieldName = "birth&death" ; final com . hp . autonomy . types . requests . idol . actions . tags . DateRangeInfo rangeInfo = com . hp . autonomy . types . requests . idol . actions . tags . DateRangeInfo . builder ( ) . build ( ) ; final com . hp . auton... | org . junit . Assert . assertThat ( output , org . hamcrest . core . Is . is ( rangeInfo ) ) |
createLocationAttributeType_shouldCreateANewLocationAttributeType ( ) { int before = org . openmrs . api . context . Context . getLocationService ( ) . getAllLocationAttributeTypes ( ) . size ( ) ; java . lang . String json = "{<sp>\"name\":\"Some<sp>attributeType\",\"description\":\"Attribute<sp>Type<sp>for<sp>locatio... | org . junit . Assert . assertEquals ( ( before + 1 ) , org . openmrs . api . context . Context . getLocationService ( ) . getAllLocationAttributeTypes ( ) . size ( ) ) |
testMatch05 ( ) { boolean matchResult = namespacePatternMatcher . matchesEndToEnd ( "0" ) ; "<AssertPlaceHolder>" ; } matchesEndToEnd ( java . lang . String ) { return pattern . matcher ( input ) . matches ( ) ; } | org . junit . Assert . assertTrue ( matchResult ) |
testCompressingWithClearDictionaries ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . DataOutputStream dos = new java . io . DataOutputStream ( baos ) ; org . apache . hadoop . hbase . regionserver . wal . Dictionary dictionary = new org . apache . hadoop . hbase . ... | org . junit . Assert . assertTrue ( org . apache . hadoop . hbase . util . Bytes . equals ( blahBytes , product ) ) |
shouldSearchAndReturnAListOfConceptMapTypesMatchingTheQueryString ( ) { org . springframework . mock . web . MockHttpServletRequest req = request ( RequestMethod . GET , getURI ( ) ) ; req . addParameter ( "q" , "is" ) ; org . openmrs . module . webservices . rest . SimpleObject result = deserialize ( handle ( req ) ) ... | org . junit . Assert . assertEquals ( 2 , org . openmrs . module . webservices . rest . test . Util . getResultsSize ( result ) ) |
testEqualsObject ( ) { org . cytoscape . util . swing . FileChooserFilter filter2 = new org . cytoscape . util . swing . FileChooserFilter ( description , extension ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( org . cytosca... | org . junit . Assert . assertFalse ( filter . equals ( filter2 ) ) |
testIsConflicting_self ( ) { "<AssertPlaceHolder>" ; } isConflicting ( org . eclipse . core . runtime . jobs . ISchedulingRule ) { return rule == ( this ) ; } | org . junit . Assert . assertTrue ( rule . isConflicting ( rule ) ) |
testInsertIntoSet ( ) { ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . GenerationSubPackage subPackage1 = new ch . puzzle . itc . mobiliar . business . generator . control . extracted . templates . GenerationSubPackage ( ) ; subPackage1 . addGenerationUnit ( buildGenerationUnit ... | org . junit . Assert . assertEquals ( 3 , generationPackage . getAsSet ( ) . size ( ) ) |
testGetSchemaName ( ) { classUnderTest . setSchemaName ( "aTestString" ) ; "<AssertPlaceHolder>" ; } getSchemaName ( ) { return _schema ; } | org . junit . Assert . assertEquals ( "aTestString" , classUnderTest . getSchemaName ( ) ) |
shouldStopResultHandler ( ) { org . apache . ibatis . session . SqlSession session = org . apache . ibatis . session . SqlSessionTest . sqlMapper . openSession ( ) ; try { final org . apache . ibatis . session . SqlSessionTest . TestResultStopHandler resultHandler = new org . apache . ibatis . session . SqlSessionTest ... | org . junit . Assert . assertEquals ( 2 , resultHandler . count ) |
testTimestampDeserialization ( ) { com . owlike . genson . Genson genson = createTimestampGenson ( ) ; java . time . LocalDateTime ldt = java . time . LocalDateTime . ofInstant ( java . time . Instant . ofEpochMilli ( 5357647337L ) , defaultZoneId ) ; java . time . OffsetTime dt = ldt . toLocalTime ( ) . atOffset ( def... | org . junit . Assert . assertEquals ( dt , genson . deserialize ( jsonArray , java . time . OffsetTime . class ) ) |
testSimple ( ) { org . apache . shiro . web . filter . mgt . FilterChainResolver resolver = setupResolver ( ) ; javax . servlet . http . HttpServletResponse response = createNiceMock ( javax . servlet . http . HttpServletResponse . class ) ; javax . servlet . FilterChain chain = createNiceMock ( javax . servlet . Filte... | org . junit . Assert . assertNotNull ( resolved ) |
newRollCycleIgnored2 ( ) { java . io . File path = net . openhft . chronicle . queue . impl . single . DirectoryUtils . tempDir ( "newRollCycleIgnored2" ) ; net . openhft . chronicle . core . time . SetTimeProvider timeProvider = new net . openhft . chronicle . core . time . SetTimeProvider ( ) ; net . openhft . chroni... | org . junit . Assert . assertEquals ( ( 1 + cyclesToWrite ) , observer . documentsRead ) |
get_subject ( ) { "<AssertPlaceHolder>" ; } get ( org . apache . shiro . subject . Subject ) { if ( subject != null ) { java . lang . Object principal = subject . getPrincipal ( ) ; if ( principal != null ) { return principal . toString ( ) ; } } return org . sonatype . nexus . security . UserIdHelper . UNKNOWN ; } | org . junit . Assert . assertThat ( org . sonatype . nexus . security . UserIdHelper . get ( subject ( "test" ) ) , org . hamcrest . Matchers . is ( "test" ) ) |
testPatchFilePath ( ) { java . lang . String patchFilePath = citrixResourceBase . getPatchFilePath ( ) ; java . lang . String patch = "scripts/vm/hypervisor/xenserver/xcpserver/patch" ; "<AssertPlaceHolder>" ; } getPatchFilePath ( ) { return "scripts/vm/hypervisor/xenserver/xenserver60/patch" ; } | org . junit . Assert . assertEquals ( patch , patchFilePath ) |
testSetHighBlue ( ) { com . opera . core . systems . model . OperaColor color = new com . opera . core . systems . model . OperaColor ( 120 , 110 , 100 ) ; color . setHighBlue ( 255 ) ; "<AssertPlaceHolder>" ; } getHighBlue ( ) { return highBlue ; } | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 255 ) ) , color . getHighBlue ( ) ) |
testModifyTicketExpireNullTicketId ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyExpiration ( null , validDate ) ; "<AssertPlaceHolder>" ; } instanceForModifyExpiration ( java . lang . String , java . lang . String ) {... | org . junit . Assert . assertNotNull ( pi ) |
testCreation ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( entity ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.