input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testCanOperatorBeSetWhenFactTypeIsNotNilAndConstraintValueIsPredicate ( ) { final java . lang . String factField = "factField" ; final int constraintValue = org . drools . workbench . models . datamodel . rule . BaseSingleFieldConstraint . TYPE_PREDICATE ; doReturn ( factField ) . when ( plugin ) . getFactField ( ) ; doReturn ( constraintValue ) . when ( plugin ) . constraintValue ( ) ; "<AssertPlaceHolder>" ; } canOperatorBeSet ( ) { return ( hasFactField ( ) ) && ( ! ( isConstraintValuePredicate ( ) ) ) ; }
org . junit . Assert . assertFalse ( page . canOperatorBeSet ( ) )
testToBuilder ( ) { compareExternalTableDefinition ( com . google . cloud . bigquery . ExternalTableDefinitionTest . EXTERNAL_TABLE_DEFINITION , com . google . cloud . bigquery . ExternalTableDefinitionTest . EXTERNAL_TABLE_DEFINITION . toBuilder ( ) . build ( ) ) ; com . google . cloud . bigquery . ExternalTableDefinition externalTableDefinition = com . google . cloud . bigquery . ExternalTableDefinitionTest . EXTERNAL_TABLE_DEFINITION . toBuilder ( ) . setCompression ( "NONE" ) . build ( ) ; "<AssertPlaceHolder>" ; externalTableDefinition = externalTableDefinition . toBuilder ( ) . setCompression ( com . google . cloud . bigquery . ExternalTableDefinitionTest . COMPRESSION ) . build ( ) ; compareExternalTableDefinition ( com . google . cloud . bigquery . ExternalTableDefinitionTest . EXTERNAL_TABLE_DEFINITION , externalTableDefinition ) ; } getCompression ( ) { return compression ; }
org . junit . Assert . assertEquals ( "NONE" , externalTableDefinition . getCompression ( ) )
testGetBeanDescriptor ( ) { org . pentaho . reporting . engine . classic . core . metadata . ReportPreProcessorMetaData [ ] metas = org . pentaho . reporting . engine . classic . core . metadata . ReportPreProcessorRegistry . getInstance ( ) . getAllReportPreProcessorMetaDatas ( ) ; for ( org . pentaho . reporting . engine . classic . core . metadata . ReportPreProcessorMetaData meta : metas ) { org . pentaho . reporting . engine . classic . core . metadata . ReportPreProcessorPropertyMetaData [ ] propertyDescriptions = meta . getPropertyDescriptions ( ) ; for ( org . pentaho . reporting . engine . classic . core . metadata . ReportPreProcessorPropertyMetaData propertyDescription : propertyDescriptions ) { "<AssertPlaceHolder>" ; } } } getBeanDescriptor ( ) { return propertyDescriptor . get ( ) ; }
org . junit . Assert . assertNotNull ( propertyDescription . getBeanDescriptor ( ) )
testUpdateAfterUpdate ( ) { com . google . cloud . datastore . Entity entity = com . google . cloud . datastore . Entity . newBuilder ( com . google . cloud . datastore . BaseDatastoreBatchWriterTest . ENTITY1 ) . set ( "foo" , "bar" ) . build ( ) ; java . util . List < com . google . datastore . v1 . Mutation > pbs = new java . util . LinkedList ( ) ; pbs . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setUpdate ( entity . toPb ( ) ) . build ( ) ) ; batchWriter . update ( com . google . cloud . datastore . BaseDatastoreBatchWriterTest . ENTITY1 ) ; batchWriter . update ( entity ) ; "<AssertPlaceHolder>" ; } toMutationPbList ( ) { java . util . List < com . google . datastore . v1 . Mutation > mutationsPb = new java . util . ArrayList ( ) ; for ( com . google . cloud . datastore . FullEntity < com . google . cloud . datastore . IncompleteKey > entity : toAddAutoId ( ) ) { mutationsPb . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setInsert ( entity . toPb ( ) ) . build ( ) ) ; } for ( com . google . cloud . datastore . FullEntity < com . google . cloud . datastore . Key > entity : toAdd ( ) . values ( ) ) { mutationsPb . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setInsert ( entity . toPb ( ) ) . build ( ) ) ; } for ( com . google . cloud . datastore . FullEntity < com . google . cloud . datastore . Key > entity : toUpdate ( ) . values ( ) ) { mutationsPb . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setUpdate ( entity . toPb ( ) ) . build ( ) ) ; } for ( com . google . cloud . datastore . FullEntity < com . google . cloud . datastore . Key > entity : toPut ( ) . values ( ) ) { mutationsPb . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setUpsert ( entity . toPb ( ) ) . build ( ) ) ; } for ( com . google . cloud . datastore . Key key : toDelete ( ) ) { mutationsPb . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setDelete ( key . toPb ( ) ) . build ( ) ) ; } return mutationsPb ; }
org . junit . Assert . assertEquals ( pbs , batchWriter . toMutationPbList ( ) )
testDuplicateSimpleQuery ( ) { java . lang . String sql = "SELECT<sp>e1<sp>FROM<sp>pm1.g1<sp>union<sp>all<sp>select<sp>e2<sp>from<sp>pm1.g1" ; java . util . List < ? > [ ] expected = new java . util . List [ ] { java . util . Arrays . asList ( "a" ) , java . util . Arrays . asList ( "b" ) , java . util . Arrays . asList ( "a" ) , java . util . Arrays . asList ( "b" ) } ; org . teiid . query . processor . HardcodedDataManager dataManager = new org . teiid . query . processor . HardcodedDataManager ( ) ; dataManager . addData ( "SELECT<sp>pm1.g1.e1<sp>FROM<sp>pm1.g1" , new java . util . List < ? > [ ] { java . util . Arrays . asList ( "a" ) , java . util . Arrays . asList ( "b" ) } ) ; org . teiid . query . processor . ProcessorPlan plan = helpGetPlan ( sql , org . teiid . query . unittest . RealMetadataFactory . example1Cached ( ) ) ; helpProcess ( plan , dataManager , expected ) ; "<AssertPlaceHolder>" ; } getCommandHistory ( ) { return this . commandHistory ; }
org . junit . Assert . assertEquals ( 3 , dataManager . getCommandHistory ( ) . size ( ) )
testFrontendUrlWithNoMapping ( ) { java . util . Map < java . net . URI , java . net . URI > emptyMap = new java . util . HashMap ( ) ; when ( graphiteSources . getIpportsByUrl ( ) ) . thenReturn ( new java . util . HashMap ( ) ) ; when ( this . graphiteSources . getSources ( ) ) . thenReturn ( new java . util . ArrayList < com . vsct . supervision . notification . model . GraphiteSources . GraphiteSource > ( ) ) ; com . vsct . supervision . seyren . api . Alarm frontendAlarm = com . vsct . supervision . notification . TestUtils . getDefaultAlarm ( ) ; frontendAlarm . setGraphiteBaseUrl ( com . vsct . supervision . notification . model . AlarmMapperTest . DEFAULT_GRAPHITE_URL ) ; com . vsct . supervision . seyren . api . Alarm backendAlarm = alarmMapper . mapNewAlarmFormToSeyren ( frontendAlarm ) ; "<AssertPlaceHolder>" ; } getGraphiteBaseUrl ( ) { return graphiteBaseUrl ; }
org . junit . Assert . assertEquals ( com . vsct . supervision . notification . model . AlarmMapperTest . DEFAULT_GRAPHITE_URL , backendAlarm . getGraphiteBaseUrl ( ) )
testFactoryConstructorTRECThreadedlike ( ) { java . io . File f = super . tmpfolder . newFile ( "collection.spec" ) ; f . createNewFile ( ) ; java . lang . Class < ? > [ ] constructerClasses = new java . lang . Class < ? > [ ] { java . lang . String . class , java . lang . String . class , java . lang . String . class , java . lang . String . class } ; java . lang . Object [ ] constructorValues = new java . lang . Object [ ] { f . toString ( ) , org . terrier . utility . TagSet . TREC_DOC_TAGS , null , null } ; for ( java . lang . Class < ? extends org . terrier . indexing . Collection > c : org . terrier . indexing . TestCollections . ALL_COLLECTIONS ) { "<AssertPlaceHolder>" ; } } loadCollection ( java . lang . String , org . terrier . indexing . Class [ ] , java . lang . Object [ ] ) { return org . terrier . indexing . CollectionFactory . loadCollections ( CollectionName . split ( "\\s*,\\s*" ) , contructorTypes , constructorValues ) ; }
org . junit . Assert . assertNotNull ( org . terrier . indexing . CollectionFactory . loadCollection ( c . getName ( ) , constructerClasses , constructorValues ) )
shouldCountNothingWithNonMatchingFilter ( ) { org . springframework . data . neo4j . examples . movies . domain . User critic = new org . springframework . data . neo4j . examples . movies . domain . User ( "Gary" ) ; org . springframework . data . neo4j . examples . movies . domain . TempMovie film = new org . springframework . data . neo4j . examples . movies . domain . TempMovie ( "Fast<sp>and<sp>Furious<sp>XVII" ) ; org . springframework . data . neo4j . examples . movies . domain . Rating filmRating = critic . rate ( film , 2 , "They've<sp>made<sp>far<sp>too<sp>many<sp>of<sp>these<sp>films<sp>now!" ) ; filmRating . setRatingTimestamp ( 1000 ) ; userRepository . save ( critic ) ; long countRemovedObjects = ratingRepository . removeByUserName ( "Bill" ) ; "<AssertPlaceHolder>" ; } save ( S extends T ) { session . save ( entity ) ; return entity ; }
org . junit . Assert . assertEquals ( 0L , countRemovedObjects )
testFindOrphans2 ( ) { org . apromore . canoniser . bpmn . bpmn . BpmnDefinitions definitions = org . apromore . canoniser . bpmn . bpmn . BpmnDefinitions . newInstance ( new java . io . FileInputStream ( com . processconfiguration . ConfigurationAlgorithmUnitTest . trivialGatewayFile ) , true ) ; "<AssertPlaceHolder>" ; } findOrphans ( com . processconfiguration . TDefinitions ) { final java . util . Set < com . processconfiguration . TBaseElement > all = new java . util . HashSet ( ) ; final java . util . Set < com . processconfiguration . TBaseElement > canStart = new java . util . HashSet ( ) ; final java . util . Set < com . processconfiguration . TBaseElement > canEnd = new java . util . HashSet ( ) ; final com . google . common . collect . Multimap < com . processconfiguration . TBaseElement , com . processconfiguration . TBaseElement > incomingMap = com . google . common . collect . HashMultimap . create ( ) ; final com . google . common . collect . Multimap < com . processconfiguration . TBaseElement , com . processconfiguration . TBaseElement > outgoingMap = com . google . common . collect . HashMultimap . create ( ) ; definitions . accept ( new com . processconfiguration . TraversingVisitor ( new com . processconfiguration . MyTraverser ( ) { @ com . processconfiguration . Override public void traverse ( com . processconfiguration . Configurable . Configuration aBean , com . processconfiguration . Visitor aVisitor ) { } } , new com . processconfiguration . InheritingVisitor ( ) { @ com . processconfiguration . Override public void visit ( final com . processconfiguration . TAssociation that ) { try { com . processconfiguration . TBaseElement source = ( ( org . apromore . canoniser . bpmn . bpmn . BpmnDefinitions ) ( definitions ) ) . findElement ( that . getSourceRef ( ) ) ; if ( source != null ) { incomingMap . put ( that , source ) ; incomingMap . put ( source , that ) ; } com . processconfiguration . TBaseElement target = ( ( org . apromore . canoniser . bpmn . bpmn . BpmnDefinitions ) ( definitions ) ) . findElement ( that . getTargetRef ( ) ) ; if ( target != null ) { incomingMap . put ( target , that ) ; incomingMap . put ( that , target ) ; } } catch ( org . apromore . canoniser . exception . CanoniserException e ) { e . printStackTrace ( ) ; } } @ com . processconfiguration . Override public void visit ( final com . processconfiguration . TBoundaryEvent that ) { try { com . processconfiguration . TBaseElement activity = ( ( com . processconfiguration . TBaseElement ) ( ( ( org . apromore . canoniser . bpmn . bpmn . BpmnDefinitions ) ( definitions ) ) . findElement ( that . getAttachedToRef ( ) ) ) ) ; if ( ! ( activity instanceof com . processconfiguration . TActivity ) ) { com . processconfiguration . ConfigurationAlgorithm . LOGGER . warning ( ( ( ( ( "Boundary<sp>event<sp>" + ( that . getId ( ) ) ) + "<sp>attached<sp>to<sp>" ) + ( activity . getId ( ) ) ) + "<sp>which<sp>is<sp>not<sp>an<sp>activity" ) ) ; } incomingMap . put ( that , activity ) ; } catch ( org . apromore . canoniser . exception . CanoniserException e ) { e . printStackTrace ( ) ; } } @ com . processconfiguration . Override public void visit ( final com . processconfiguration . TDataAssociation that ) { for ( javax . xml . bind . JAXBElement < java . lang . Object > jeo : that . getSourceRef ( ) ) { com . processconfiguration . TBaseElement source = ( ( com . processconfiguration . TBaseElement ) ( jeo . getValue ( ) ) ) ; incomingMap . put ( that , source ) ; incomingMap . put ( source , that ) ; } com . processconfiguration . TBaseElement target = that . getTargetRef ( ) ; if ( target != null ) { incomingMap . put ( target , that ) ; incomingMap . put ( that , target ) ; } } @ com . processconfiguration . Override public void visit ( final com . processconfiguration . TMessageFlow that ) { try { com . processconfiguration . TBaseElement source = ( ( org . apromore . canoniser . bpmn . bpmn . BpmnDefinitions ) ( definitions ) ) . findElement ( that . getSourceRef ( ) ) ; if ( source != null ) { incomingMap . put ( that , source ) ; incomingMap . put ( source , that ) ; } com . processconfiguration . TBaseElement target = ( ( org . apromore . canoniser . bpmn . bpmn . BpmnDefinitions ) ( definitions ) ) . findElement ( that . getTargetRef ( ) ) ; if ( target != null ) { incomingMap . put ( target , that ) ; incomingMap . put ( that , that ) ; } } catch ( org . apromore . canoniser . exception . CanoniserException e ) { e . printStackTrace ( ) ; } } @ com . processconfiguration . Override public void visit ( final com . processconfiguration . TSequenceFlow that ) { if ( ( that . getSourceRef ( ) ) != null ) { incomingMap . put ( that , that . getSourceRef ( ) ) ; } if ( ( that . getTargetRef ( ) ) != null ) { incomingMap . put ( that . getTargetRef ( ) , that ) ; } } } ) ) ; com . google . common . collect . Multimaps . invertFrom ( incomingMap , outgoingMap ) ; definitions . accept ( new com . processconfiguration . TraversingVisitor ( new com . processconfiguration . MyTraverser ( ) {
org . junit . Assert . assertTrue ( com . processconfiguration . ConfigurationAlgorithm . findOrphans ( definitions ) . isEmpty ( ) )
shouldParseArguments ( ) { final java . util . Map < java . lang . String , java . lang . String > parseArguments = uut . parseArguments ( "kind:default<sp>id:10" ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( examples . getRows ( ) . size ( ) ) - 1 ; }
org . junit . Assert . assertThat ( parseArguments . size ( ) , org . hamcrest . Matchers . is ( 2 ) )
relativePathsWorkForFedoraHome ( ) { java . lang . System . setProperty ( org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoaderTest . HOME_PROP , "test" ) ; java . lang . System . setProperty ( org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoaderTest . PROP_TEST , "sub" ) ; loader . loadSystemProperties ( ) ; "<AssertPlaceHolder>" ; org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoaderTest . clearProps ( ) ; } loadSystemProperties ( ) { org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoader . LOGGER . info ( "Loading<sp>properties" ) ; if ( ( java . lang . System . getProperty ( "integration-test" ) ) == null ) { org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoader . LOGGER . trace ( "Setting<sp>default<sp>properties,<sp>if<sp>necessary." ) ; final java . lang . String fcrepoHome = java . lang . System . getProperty ( "fcrepo.home" ) ; final java . lang . String baseDir = ( fcrepoHome == null ) ? ( ( ( java . lang . System . getProperty ( "user.dir" ) ) + ( org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoader . SEP ) ) + "fcrepo4-data" ) + ( org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoader . SEP ) : fcrepoHome + ( org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoader . SEP ) ; for ( final org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoader . PROPERTIES prop : org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoader . PROPERTIES . values ( ) ) { final java . lang . String value = java . lang . System . getProperty ( prop . getValue ( ) ) ; if ( value == null ) { if ( prop . getSetDefaultValue ( ) ) { org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoader . setProperty ( prop . getValue ( ) , baseDir ) ; } } else { org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoader . updateRelativePropertyPath ( prop . getValue ( ) , value , baseDir ) ; } } } for ( final org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoader . PROPERTIES prop : org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoader . PROPERTIES . values ( ) ) { final java . lang . String val = prop . getValue ( ) ; org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoader . LOGGER . info ( "{}<sp>=<sp>{}" , val , java . lang . System . getProperty ( val ) ) ; } }
org . junit . Assert . assertEquals ( new java . io . File ( new java . io . File ( "test" ) , "sub" ) , new java . io . File ( java . lang . System . getProperty ( org . fcrepo . kernel . modeshape . spring . DefaultPropertiesLoaderTest . PROP_TEST ) ) )
testWriteArtifactViaStreamWithNonFatalStatus ( ) { java . io . OutputStream addSink = subject . getOutputStream ( org . eclipse . tycho . repository . local . LocalArtifactRepositoryP2APITest . foreignEquivalentOf ( org . eclipse . tycho . repository . local . LocalArtifactRepositoryP2APITest . NEW_DESCRIPTOR ) ) ; addSink . write ( new byte [ 33 ] ) ; ( ( org . eclipse . equinox . internal . provisional . p2 . repository . IStateful ) ( addSink ) ) . setStatus ( new org . eclipse . core . runtime . Status ( org . eclipse . core . runtime . IStatus . WARNING , "test" , "irrelevant<sp>warning" ) ) ; addSink . close ( ) ; "<AssertPlaceHolder>" ; } contains ( java . net . URI ) { return delegate . contains ( location ) ; }
org . junit . Assert . assertThat ( subject . contains ( org . eclipse . tycho . repository . local . LocalArtifactRepositoryP2APITest . NEW_DESCRIPTOR ) , org . hamcrest . CoreMatchers . is ( true ) )
testDoSoapLoginFailure ( ) { java . lang . String samlRequest = soapRequest ; javax . servlet . http . HttpServletRequest request = mock ( javax . servlet . http . HttpServletRequest . class ) ; when ( request . isSecure ( ) ) . thenReturn ( true ) ; javax . ws . rs . core . Response response = idpEndpoint . doSoapLogin ( new java . io . ByteArrayInputStream ( samlRequest . getBytes ( StandardCharsets . UTF_8 ) ) , request ) ; "<AssertPlaceHolder>" ; } doSoapLogin ( java . io . InputStream , javax . servlet . http . HttpServletRequest ) { if ( ! ( request . isSecure ( ) ) ) { throw new java . lang . IllegalArgumentException ( org . codice . ddf . security . idp . server . IdpEndpoint . AUTHN_REQUEST_MUST_USE_TLS ) ; } org . codice . ddf . security . idp . binding . soap . SoapBinding soapBinding = new org . codice . ddf . security . idp . binding . soap . SoapBinding ( systemCrypto , getServiceProvidersMap ( ) , getPresignPlugins ( ) , spMetadata , SUPPORTED_BINDINGS ) ; try { java . lang . String bodyStr = org . apache . commons . io . IOUtils . toString ( body , StandardCharsets . UTF_8 ) ; org . opensaml . saml . saml2 . core . AuthnRequest authnRequest = soapBinding . decoder ( ) . decodeRequest ( bodyStr ) ; java . lang . String relayState = ( ( org . codice . ddf . security . idp . binding . soap . SoapRequestDecoder ) ( soapBinding . decoder ( ) ) ) . decodeRelayState ( bodyStr ) ; soapBinding . validator ( ) . validateRelayState ( relayState , strictRelayState ) ; soapBinding . validator ( ) . validateAuthnRequest ( authnRequest , bodyStr , null , null , null , strictSignature ) ; boolean hasCookie = hasValidCookie ( request , authnRequest . isForceAuthn ( ) ) ; org . codice . ddf . security . idp . server . IdpEndpoint . AuthObj authObj = determineAuthMethod ( bodyStr , authnRequest ) ; org . opensaml . saml . saml2 . core . Response response = handleLogin ( authnRequest , authObj . method , request , authObj , soapBinding , authnRequest . isPassive ( ) , hasCookie , ( ( authnRequest . getSignature ( ) ) != null ) ) ; javax . ws . rs . core . Response samlpResponse = soapBinding . creator ( ) . getSamlpResponse ( relayState , authnRequest , response , null ) ; samlpResponse . getHeaders ( ) . put ( "SOAPAction" , java . util . Collections . singletonList ( "http://www.oasis-open.org/committees/security" ) ) ; return samlpResponse ; } catch ( java . io . IOException e ) { org . codice . ddf . security . idp . server . IdpEndpoint . LOGGER . debug ( "Unable<sp>to<sp>decode<sp>SOAP<sp>AuthN<sp>Request" , e ) ; } catch ( ddf . security . samlp . SimpleSign e ) { org . codice . ddf . security . idp . server . IdpEndpoint . LOGGER . debug ( "Unable<sp>to<sp>validate<sp>signature." , e ) ; } catch ( ddf . security . samlp . ValidationException e ) { org . codice . ddf . security . idp . server . IdpEndpoint . LOGGER . debug ( "Unable<sp>to<sp>validate<sp>request." , e ) ; } catch ( ddf . security . service . SecurityServiceException e ) { org . codice . ddf . security . idp . server . IdpEndpoint . LOGGER . debug ( "Unable<sp>to<sp>authenticate<sp>user." , e ) ; } catch ( org . apache . wss4j . common . ext . WSSecurityException | java . lang . IllegalArgumentException e ) { org . codice . ddf . security . idp . server . IdpEndpoint . LOGGER . debug ( "Bad<sp>request." , e ) ; } return null ; }
org . junit . Assert . assertNull ( response )
testSerialization ( ) { org . jfree . chart . plot . dial . DialValueIndicator i1 = new org . jfree . chart . plot . dial . DialValueIndicator ( 0 ) ; org . jfree . chart . plot . dial . DialValueIndicator i2 = ( ( org . jfree . chart . plot . dial . DialValueIndicator ) ( org . jfree . chart . TestUtilities . serialised ( i1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( i1 , i2 )
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . document . library . opener . model . DLOpenerFileEntryReference > dlOpenerFileEntryReferences = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( dlOpenerFileEntryReferences . isEmpty ( ) )
testGet ( ) { java . util . Map < java . lang . String , java . lang . Object > map = new java . util . HashMap ( ) ; map . put ( "k1" , "v1" ) ; org . apache . cxf . tools . common . ToolContext env = new org . apache . cxf . tools . common . ToolContext ( ) ; env . setParameters ( map ) ; java . lang . String value = ( ( java . lang . String ) ( env . get ( "k1" ) ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Class ) { return ( ( T ) ( contextMap . get ( cClass ) ) ) ; }
org . junit . Assert . assertEquals ( "v1" , value )
testGetFieldTypeDescriptor ( ) { com . twitter . elephantbird . util . ThriftToDynamicProto < com . twitter . elephantbird . thrift . test . Person > converter = new com . twitter . elephantbird . util . ThriftToDynamicProto < com . twitter . elephantbird . thrift . test . Person > ( com . twitter . elephantbird . thrift . test . Person . class ) ; com . twitter . elephantbird . thrift . test . Person person = genPerson ( ) ; com . google . protobuf . Message msg = converter . convert ( person ) ; com . google . protobuf . Descriptors . FieldDescriptor expectedFd = msg . getDescriptorForType ( ) . findFieldByName ( "email" ) ; com . google . protobuf . Descriptors . FieldDescriptor actualFd = converter . getFieldDescriptor ( com . twitter . elephantbird . thrift . test . Person . class , "email" ) ; "<AssertPlaceHolder>" ; } getFieldDescriptor ( java . lang . Class , java . lang . String ) { checkState ( thriftClass ) ; com . google . protobuf . Descriptors . Descriptor descriptor = getBuilder ( thriftClass ) . getDescriptorForType ( ) ; return descriptor . findFieldByName ( fieldName ) ; }
org . junit . Assert . assertEquals ( expectedFd , actualFd )
testExecutePowerDownTaskForNonDiscverableNodeWrongOSCreds ( ) { System . out . println ( "[TS]:<sp>testExecutePowerDownTaskForNonDiscverableNodeWrongOSCreds" ) ; com . vmware . vrack . hms . common . notification . TaskResponse TR = new com . vmware . vrack . hms . common . notification . TaskResponse ( new com . vmware . vrack . hms . common . servernodes . api . ServerNode ( "4" , "10.28.197.204" , "ADMIN" , "ADMIN" ) ) ; com . vmware . vrack . hms . task . oob . ipmi . PowerDownServerTask PDSTask = new com . vmware . vrack . hms . task . oob . ipmi . PowerDownServerTask ( TR ) ; PDSTask . executeTask ( ) ; System . out . println ( ( "[TS]:<sp>Expected<sp>Result<sp>:<sp>Server<sp>Node<sp>is<sp>Powered<sp>=<sp>False<sp>,<sp>Actual<sp>Result<sp>:<sp>Server<sp>Node<sp>is<sp>Powered<sp>=<sp>" + ( TR . getNode ( ) . isPowered ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getNode ( ) { return node ; }
org . junit . Assert . assertFalse ( TR . getNode ( ) . isPowered ( ) )
test2 ( ) { nopol_examples . nopol_example_2 . NopolExample ex = new nopol_examples . nopol_example_2 . NopolExample ( ) ; "<AssertPlaceHolder>" ; } getMax ( int , int ) { if ( ( b - a ) < 0 ) { return b ; } return a ; }
org . junit . Assert . assertEquals ( 4 , ex . getMax ( 4 , 2 ) )
testAuthenticatedImmediatelyAfterTokenChange ( ) { com . google . firebase . database . core . DatabaseConfig config = com . google . firebase . database . TestHelpers . getDatabaseConfig ( com . google . firebase . database . integration . RulesTestIT . masterApp ) ; com . google . firebase . database . core . AuthTokenProvider originalProvider = config . getAuthTokenProvider ( ) ; try { com . google . firebase . database . TestTokenProvider provider = new com . google . firebase . database . TestTokenProvider ( com . google . firebase . database . TestHelpers . getExecutorService ( config ) ) ; config . setAuthTokenProvider ( provider ) ; com . google . firebase . database . DatabaseReference root = com . google . firebase . database . FirebaseDatabase . getInstance ( com . google . firebase . database . integration . RulesTestIT . masterApp ) . getReference ( ) ; com . google . firebase . database . DatabaseReference ref = root . child ( com . google . firebase . database . integration . RulesTestIT . writer . getPath ( ) . toString ( ) ) ; java . lang . String token = com . google . firebase . TestOnlyImplFirebaseTrampolines . getToken ( com . google . firebase . database . integration . RulesTestIT . masterApp , true ) ; provider . setToken ( token ) ; com . google . firebase . database . DatabaseError err = new com . google . firebase . database . future . WriteFuture ( ref . child ( "any_auth" ) , true ) . timedGet ( ) ; "<AssertPlaceHolder>" ; } finally { config . setAuthTokenProvider ( originalProvider ) ; } } timedGet ( ) { return timedGet ( TestUtils . TEST_TIMEOUT_MILLIS , TimeUnit . MILLISECONDS ) ; }
org . junit . Assert . assertNull ( err )
testValenceT ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( VALENCE , 4 ) ; org . openscience . cdk . interfaces . IAtom a1 = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; org . openscience . cdk . interfaces . IBond b1 = mock ( org . openscience . cdk . interfaces . IBond . class ) ; org . openscience . cdk . interfaces . IBond b2 = mock ( org . openscience . cdk . interfaces . IBond . class ) ; when ( a1 . getImplicitHydrogenCount ( ) ) . thenReturn ( 1 ) ; when ( b1 . getOrder ( ) ) . thenReturn ( IBond . Order . DOUBLE ) ; when ( b2 . getOrder ( ) ) . thenReturn ( IBond . Order . SINGLE ) ; when ( a1 . bonds ( ) ) . thenReturn ( java . util . Arrays . asList ( b1 , b2 ) ) ; "<AssertPlaceHolder>" ; } matches ( org . openscience . cdk . interfaces . IAtomContainer ) { return matches ( atomContainer , true ) ; }
org . junit . Assert . assertTrue ( expr . matches ( a1 ) )
days_between_two_dates_in_java_with_joda ( ) { org . joda . time . DateTime startDate = new org . joda . time . DateTime ( ) . minusDays ( 1 ) ; org . joda . time . DateTime endDate = new org . joda . time . DateTime ( ) ; org . joda . time . Days d = org . joda . time . Days . daysBetween ( startDate , endDate ) ; int days = d . getDays ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 1 , days )
testSerialize ( ) { com . nextdoor . bender . ipc . splunk . SplunkTransportSerializer serializer = new com . nextdoor . bender . ipc . splunk . SplunkTransportSerializer ( "log" ) ; com . nextdoor . bender . InternalEvent record = new com . nextdoor . bender . ipc . splunk . SplunkTansportSerializerTest . DummyEvent ( "foo" , 0 ) ; record . setEventTime ( 1505927823123L ) ; record . setSerialized ( "foo" ) ; java . lang . String actual = new java . lang . String ( serializer . serialize ( record ) ) ; java . lang . String expected = com . nextdoor . bender . testutils . TestUtils . getResourceString ( this . getClass ( ) , "basic_output.txt" ) ; "<AssertPlaceHolder>" ; } getResourceString ( java . lang . Class , java . lang . String ) { return org . apache . commons . io . IOUtils . toString ( new java . io . InputStreamReader ( clazz . getResourceAsStream ( resource ) , "UTF-8" ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testEQ_4 ( ) { org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; program = new org . ethereum . vm . Program ( org . spongycastle . util . encoders . Hex . decode ( "622A3B4C0E" ) , invoke ) ; try { vm . step ( program ) ; vm . step ( program ) ; vm . step ( program ) ; } finally { "<AssertPlaceHolder>" ; } } isStopped ( ) { return stopped ; }
org . junit . Assert . assertTrue ( program . isStopped ( ) )
testApiMisuse4_1 ( ) { "<AssertPlaceHolder>" ; } format ( org . ocpsoft . prettytime . Duration ) { return ( duration . getQuantityRounded ( 50 ) ) + "<sp>minut" ; }
org . junit . Assert . assertEquals ( t . format ( new java . util . Date ( ) ) , t . format ( ( ( java . util . Calendar ) ( null ) ) ) )
replaceSubstring_emptyString ( ) { java . lang . String str = "" ; java . lang . String result = org . oscm . string . Strings . replaceSubstring ( 0 , 0 , str , "replacement" ) ; "<AssertPlaceHolder>" ; } replaceSubstring ( int , int , java . lang . String , java . lang . String ) { java . lang . String result = null ; if ( ( ( ( ( str != null ) && ( value != null ) ) && ( from >= 0 ) ) && ( from <= to ) ) && ( to < ( str . length ( ) ) ) ) { java . lang . String head = null ; java . lang . String tail = null ; head = str . substring ( 0 , from ) ; tail = str . substring ( ( to + 1 ) , str . length ( ) ) ; result = ( head + value ) + tail ; } return result ; }
org . junit . Assert . assertNull ( result )
createSimplePath ( ) { com . querydsl . core . types . Path < java . lang . Object > path = pathFactory . createSimplePath ( java . lang . Object . class , metadata ) ; "<AssertPlaceHolder>" ; } createSimplePath ( java . lang . Class , com . querydsl . core . types . PathMetadata ) { return com . querydsl . core . types . dsl . Expressions . path ( type , metadata ) ; }
org . junit . Assert . assertNotNull ( path )
testLocalUserGetEid ( ) { java . lang . String eid = userDirectoryService . getUserEid ( org . sakaiproject . user . impl . test . UserDirectoryServiceGetTest . eidToId . get ( "localuser" ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { java . util . Map bindings = m_bindings . getBindings ( ) ; if ( bindings == null ) { log . warn ( "get:<sp>no<sp>bindings!" ) ; return null ; } return bindings . get ( name ) ; }
org . junit . Assert . assertTrue ( "localuser" . equals ( eid ) )
drainQueue ( ) { final com . cetsoft . imcache . cache . async . ConcurrentEvictionListenerTest . TasksHolder tasksHolder = new com . cetsoft . imcache . cache . async . ConcurrentEvictionListenerTest . TasksHolder ( ) ; doAnswer ( new org . mockito . stubbing . Answer ( ) { public java . lang . Object answer ( org . mockito . invocation . InvocationOnMock invocation ) throws java . lang . Throwable { java . util . List < com . cetsoft . imcache . cache . async . CacheTask < java . lang . Object , java . lang . Object > > tasks = ( ( java . util . List < com . cetsoft . imcache . cache . async . CacheTask < java . lang . Object , java . lang . Object > > ) ( invocation . getArguments ( ) [ 0 ] ) ) ; tasks . add ( cacheTask ) ; tasksHolder . tasks = tasks ; return null ; } } ) . when ( cacheTasks ) . drainTo ( anyList ( ) , anyInt ( ) ) ; doNothing ( ) . when ( asyncEvictionListener ) . save ( anyList ( ) ) ; asyncEvictionListener . drainQueue ( ) ; "<AssertPlaceHolder>" ; } get ( byte [ ] ) { return getClient ( ) . get ( key ) ; }
org . junit . Assert . assertEquals ( cacheTask , tasksHolder . tasks . get ( 0 ) )
testTimerWithNot ( ) { final org . kie . api . KieBase kbase = org . drools . testcoverage . common . util . KieBaseUtil . getKieBaseFromClasspathResources ( "timer-and-calendar-test" , kieBaseTestConfiguration , "org/drools/compiler/integrationtests/test_Timer_With_Not.drl" ) ; final org . kie . api . runtime . KieSession ksession = kbase . newKieSession ( ) ; try { ksession . fireAllRules ( ) ; java . lang . Thread . sleep ( 200 ) ; ksession . fireAllRules ( ) ; java . lang . Thread . sleep ( 200 ) ; ksession . fireAllRules ( ) ; "<AssertPlaceHolder>" ; } finally { ksession . dispose ( ) ; } } getFactCount ( ) { return 0L ; }
org . junit . Assert . assertEquals ( 2 , ksession . getFactCount ( ) )
testGetTypeOpMap ( ) { parser = new org . ebayopensource . turmeric . tools . annoparser . parser . impl . WsdlParserImpl ( ) ; java . lang . String operationName = "testOp" ; java . util . List < org . ebayopensource . turmeric . tools . annoparser . dataobjects . OperationHolder > op = new java . util . ArrayList < org . ebayopensource . turmeric . tools . annoparser . dataobjects . OperationHolder > ( ) ; org . ebayopensource . turmeric . tools . annoparser . dataobjects . OperationHolder operation = new org . ebayopensource . turmeric . tools . annoparser . dataobjects . OperationHolder ( ) ; operation . setName ( operationName ) ; op . add ( operation ) ; org . ebayopensource . turmeric . tools . annoparser . dataobjects . ComplexType ctype = new org . ebayopensource . turmeric . tools . annoparser . dataobjects . ComplexType ( ) ; ctype . setName ( "test" ) ; java . util . Map < java . lang . String , java . util . List < org . ebayopensource . turmeric . tools . annoparser . dataobjects . OperationHolder > > testMap = new java . util . HashMap < java . lang . String , java . util . List < org . ebayopensource . turmeric . tools . annoparser . dataobjects . OperationHolder > > ( ) ; testMap . put ( ctype . getName ( ) , op ) ; parser . setTypeOpMap ( testMap ) ; java . util . Map returnMap = parser . getTypeOpMap ( ) ; if ( ( returnMap != null ) && ( returnMap . containsKey ( "test" ) ) ) { java . util . List < org . ebayopensource . turmeric . tools . annoparser . dataobjects . OperationHolder > operList = ( ( java . util . List < org . ebayopensource . turmeric . tools . annoparser . dataobjects . OperationHolder > ) ( returnMap . get ( "test" ) ) ) ; "<AssertPlaceHolder>" ; } } getTypeOpMap ( ) { return typeOpMap ; }
org . junit . Assert . assertEquals ( 1 , operList . size ( ) )
testToCustomerValidate_WrongUrl ( ) { voOrganization . setUrl ( "htp://www.fujitsu.com" ) ; try { org . oscm . accountservice . assembler . OrganizationAssembler . toCustomer ( voOrganization ) ; org . junit . Assert . fail ( "Invalid<sp>url<sp>must<sp>lead<sp>to<sp>validation<sp>error." ) ; } catch ( org . oscm . internal . types . exception . ValidationException e ) { "<AssertPlaceHolder>" ; } } toCustomer ( org . oscm . internal . vo . VOOrganization ) { org . oscm . accountservice . assembler . OrganizationAssembler . validate ( voOrganization ) ; final org . oscm . accountservice . assembler . Organization organization = new org . oscm . accountservice . assembler . Organization ( ) ; org . oscm . accountservice . assembler . OrganizationAssembler . copyAttributes ( organization , voOrganization ) ; return organization ; }
org . junit . Assert . assertNotNull ( e )
evaluateNeuralNetworkIris ( ) { org . jpmml . rapidminer . Batch batch = new org . jpmml . rapidminer . RapidMinerBatch ( "NeuralNetwork" , "Iris" ) ; "<AssertPlaceHolder>" ; } evaluate ( org . jpmml . evaluator . Batch ) { org . jpmml . evaluator . PMML pmml = org . jpmml . evaluator . IOUtil . unmarshal ( batch . getModel ( ) ) ; org . jpmml . evaluator . PMMLManager pmmlManager = new org . jpmml . evaluator . PMMLManager ( pmml ) ; org . jpmml . evaluator . ModelManager < ? > modelManager = pmmlManager . getModelManager ( null , org . jpmml . evaluator . ModelEvaluatorFactory . getInstance ( ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > > input = org . jpmml . evaluator . CsvUtil . load ( batch . getInput ( ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > > output = org . jpmml . evaluator . CsvUtil . load ( batch . getOutput ( ) ) ; org . jpmml . evaluator . Evaluator evaluator = ( ( org . jpmml . evaluator . Evaluator ) ( modelManager ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . Object > > table = org . jpmml . evaluator . Lists . newArrayList ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > activeFields = evaluator . getActiveFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > groupFields = evaluator . getGroupFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > predictedFields = evaluator . getPredictedFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > outputFields = evaluator . getOutputFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > inputFields = org . jpmml . evaluator . Lists . newArrayList ( ) ; inputFields . addAll ( activeFields ) ; inputFields . addAll ( groupFields ) ; for ( int i = 0 ; i < ( input . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > inputRow = input . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . Object > arguments = org . jpmml . evaluator . Maps . newLinkedHashMap ( ) ; for ( org . jpmml . evaluator . FieldName inputField : inputFields ) { java . lang . String inputCell = inputRow . get ( inputField ) ; java . lang . Object inputValue = evaluator . prepare ( inputField , inputCell ) ; arguments . put ( inputField , inputValue ) ; } table . add ( arguments ) ; } if ( ( groupFields . size ( ) ) == 1 ) { org . jpmml . evaluator . FieldName groupField = groupFields . get ( 0 ) ; table = org . jpmml . evaluator . EvaluatorUtil . groupRows ( groupField , table ) ; } else if ( ( groupFields . size ( ) ) > 1 ) { throw new org . jpmml . evaluator . EvaluationException ( ) ; } if ( output . isEmpty ( ) ) { for ( int i = 0 ; i < ( table . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > arguments = table . get ( i ) ; evaluator . evaluate ( arguments ) ; } return true ; } else { if ( ( table . size ( ) ) != ( output . size ( ) ) ) { throw new org . jpmml . evaluator . EvaluationException ( ) ; } boolean success = true ; for ( int i = 0 ; i < ( output . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > outputRow = output . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > arguments = table . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > result = evaluator . evaluate ( arguments ) ; for ( org . jpmml . evaluator . FieldName predictedField : predictedFields ) { java . lang . String outputCell = outputRow . get ( predictedField ) ; java . lang . Object predictedValue = org . jpmml . evaluator . EvaluatorUtil . decode ( result . get ( predictedField ) ) ; success &= org . jpmml . evaluator . BatchUtil . acceptable ( outputCell , predictedValue ) ; } for ( org . jpmml . evaluator . FieldName outputField : outputFields ) { java . lang . String outputCell = outputRow . get ( outputField ) ; java . lang . Object computedValue = result . get ( outputField ) ; success &= ( outputCell != null ) ? org . jpmml . evaluator . BatchUtil . acceptable ( outputCell , computedValue
org . junit . Assert . assertTrue ( org . jpmml . rapidminer . BatchUtil . evaluate ( batch ) )
testIgnoreTruncatedValueErrorTolerance ( ) { org . apache . tajo . conf . TajoConf conf = new org . apache . tajo . conf . TajoConf ( ) ; org . apache . tajo . catalog . TableMeta meta = org . apache . tajo . catalog . CatalogUtil . newTableMeta ( BuiltinStorages . JSON , conf ) ; meta . putProperty ( StorageUtil . TEXT_ERROR_TOLERANCE_MAXNUM , "1" ) ; org . apache . tajo . storage . fragment . FileFragment fragment = org . apache . tajo . storage . TestDelimitedTextFile . getFileFragment ( "testErrorTolerance3.json" ) ; org . apache . tajo . storage . Scanner scanner = org . apache . tajo . storage . TablespaceManager . getLocalFs ( ) . getScanner ( meta , org . apache . tajo . storage . TestDelimitedTextFile . schema , fragment , null ) ; scanner . init ( ) ; try { org . apache . tajo . storage . Tuple tuple = scanner . next ( ) ; "<AssertPlaceHolder>" ; } finally { scanner . close ( ) ; } } next ( ) { try { if ( ( totalRow ) <= 0 ) { return false ; } cur = nextTuple ( ) ; ( curRow ) ++ ; if ( ( cur ) != null ) { return true ; } } catch ( java . io . IOException e ) { throw new org . apache . tajo . jdbc . SQLException ( e . getMessage ( ) , e ) ; } return false ; }
org . junit . Assert . assertNull ( tuple )
createAndAdHocRouteNotificationWorkflowDocument_customKEW ( ) { org . kuali . rice . ken . bo . NotificationBo notification = services . getNotificationService ( ) . getNotification ( TestConstants . NOTIFICATION_1 ) ; notification . setDocTypeName ( org . kuali . rice . ken . services . impl . NotificationWorkflowDocumentServiceImplTest . CUSTOM_NOTIFICATION_DOC_TYPE ) ; org . kuali . rice . kew . api . document . Document document = createNotificationWorkflowDocument ( notification ) ; "<AssertPlaceHolder>" ; } getDocumentTypeName ( ) { return documentTypeName ; }
org . junit . Assert . assertEquals ( org . kuali . rice . ken . services . impl . NotificationWorkflowDocumentServiceImplTest . CUSTOM_NOTIFICATION_DOC_TYPE , document . getDocumentTypeName ( ) )
set_prompt_by_interpreter ( ) { final java . io . StringReader in = new java . io . StringReader ( "\n" ) ; for ( java . lang . String P : new java . lang . String [ ] { "abc><sp>" , "cde#<sp>" } ) { try ( java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ) { bsh . Interpreter bsh = new bsh . Interpreter ( in , new java . io . PrintStream ( baos ) , new java . io . PrintStream ( baos ) , true ) ; bsh . setExitOnEOF ( false ) ; bsh . set ( "bsh.prompt" , P ) ; bsh . run ( ) ; "<AssertPlaceHolder>" ; } } } toString ( ) { return ( ( super . toString ( ) ) + ":<sp>" ) + ( tokenImage [ kind ] ) ; }
org . junit . Assert . assertTrue ( baos . toString ( ) . contains ( P ) )
shouldSortFromLowToHigh ( ) { final java . util . List < ? > priorities = java . util . Arrays . asList ( ro . isdc . wro . util . provider . TestProviderPriority . MEDIUM_HIGH , ro . isdc . wro . util . provider . TestProviderPriority . HIGH , ro . isdc . wro . util . provider . TestProviderPriority . LOW , ro . isdc . wro . util . provider . TestProviderPriority . MEDIUM , ro . isdc . wro . util . provider . TestProviderPriority . MEDIUM , ro . isdc . wro . util . provider . TestProviderPriority . HIGH , ro . isdc . wro . util . provider . TestProviderPriority . LOW , ro . isdc . wro . util . provider . TestProviderPriority . MEDIUM , ro . isdc . wro . util . provider . TestProviderPriority . HIGH ) ; java . util . Collections . sort ( priorities , Ordered . DESCENDING_COMPARATOR ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( ro . isdc . wro . util . provider . TestProviderPriority . HIGH , ro . isdc . wro . util . provider . TestProviderPriority . HIGH , ro . isdc . wro . util . provider . TestProviderPriority . HIGH , ro . isdc . wro . util . provider . TestProviderPriority . MEDIUM_HIGH , ro . isdc . wro . util . provider . TestProviderPriority . MEDIUM , ro . isdc . wro . util . provider . TestProviderPriority . MEDIUM , ro . isdc . wro . util . provider . TestProviderPriority . MEDIUM , ro . isdc . wro . util . provider . TestProviderPriority . LOW , ro . isdc . wro . util . provider . TestProviderPriority . LOW ) , priorities )
testGetBondLengthAverage_IReaction ( ) { org . openscience . cdk . interfaces . IAtom atom1 = new org . openscience . cdk . Atom ( "C" ) ; atom1 . setPoint2d ( new javax . vecmath . Point2d ( 0 , 0 ) ) ; org . openscience . cdk . interfaces . IAtom atom2 = new org . openscience . cdk . Atom ( "C" ) ; atom2 . setPoint2d ( new javax . vecmath . Point2d ( 1 , 0 ) ) ; org . openscience . cdk . interfaces . IAtomContainer acont = new org . openscience . cdk . AtomContainer ( ) ; org . openscience . cdk . interfaces . IReaction reaction = new org . openscience . cdk . Reaction ( ) ; reaction . addReactant ( acont ) ; acont . addAtom ( atom1 ) ; acont . addAtom ( atom2 ) ; acont . addBond ( 0 , 1 , IBond . Order . SINGLE ) ; "<AssertPlaceHolder>" ; } getBondLengthAverage ( org . openscience . cdk . interfaces . IAtomContainer ) { double bondLengthSum = 0 ; java . util . Iterator < org . openscience . cdk . interfaces . IBond > bonds = container . bonds ( ) . iterator ( ) ; int bondCounter = 0 ; while ( bonds . hasNext ( ) ) { org . openscience . cdk . interfaces . IBond bond = bonds . next ( ) ; org . openscience . cdk . interfaces . IAtom atom1 = bond . getBegin ( ) ; org . openscience . cdk . interfaces . IAtom atom2 = bond . getEnd ( ) ; if ( ( ( atom1 . getPoint2d ( ) ) != null ) && ( ( atom2 . getPoint2d ( ) ) != null ) ) { bondCounter ++ ; bondLengthSum += org . openscience . cdk . geometry . GeometryUtil . getLength2D ( bond ) ; } } return bondLengthSum / bondCounter ; }
org . junit . Assert . assertEquals ( 1.0 , org . openscience . cdk . geometry . GeometryUtil . getBondLengthAverage ( reaction ) , 0.0 )
testStartNoneEventNameEmpty ( ) { org . kie . workbench . common . stunner . bpmn . definition . StartNoneEvent startNoneEvent = new org . kie . workbench . common . stunner . bpmn . definition . StartNoneEvent ( ) ; startNoneEvent . getGeneral ( ) . setName ( new org . kie . workbench . common . stunner . bpmn . definition . property . general . Name ( "" ) ) ; java . util . Set < javax . validation . ConstraintViolation < org . kie . workbench . common . stunner . bpmn . definition . StartNoneEvent > > violations = this . validator . validate ( startNoneEvent ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return violations . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( violations . isEmpty ( ) )
sort ( ) { osmedile . intellij . stringmanip . sort . support . SortSettings sortSettings = osmedile . intellij . stringmanip . sort . support . SortSettings . allFeaturesDisabled ( Sort . CASE_SENSITIVE_A_Z ) ; java . util . List < java . lang . String > result = new osmedile . intellij . stringmanip . sort . support . SortLines ( input , sortSettings ) . sortLines ( ) ; "<AssertPlaceHolder>" ; } sortLines ( ) { osmedile . intellij . stringmanip . sort . support . Sort sortType = sortSettings . getSortType ( ) ; osmedile . intellij . stringmanip . sort . support . List < osmedile . intellij . stringmanip . sort . support . SortLine > lines = sortType . sortLines ( new osmedile . intellij . stringmanip . sort . support . ArrayList < osmedile . intellij . stringmanip . sort . support . SortLine > ( this . lines ) , sortSettings . getComparatorEnum ( ) ) ; osmedile . intellij . stringmanip . sort . support . List < java . lang . String > result = new osmedile . intellij . stringmanip . sort . support . ArrayList < java . lang . String > ( ) ; for ( int i = 0 ; i < ( lines . size ( ) ) ; i ++ ) { osmedile . intellij . stringmanip . sort . support . SortLine originalLine = this . lines . get ( i ) ; osmedile . intellij . stringmanip . sort . support . SortLine newLine = lines . get ( i ) ; result . add ( originalLine . transformTo ( newLine ) ) ; } for ( Map . Entry < java . lang . Integer , java . lang . String > emptyLine : emptyLines . entrySet ( ) ) { result . add ( emptyLine . getKey ( ) , emptyLine . getValue ( ) ) ; } return result ; }
org . junit . Assert . assertEquals ( expected , result )
deleteBotTrigger ( ) { javax . ws . rs . core . Response response = restBotTriggerStore . deleteBotTrigger ( intent ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( botTriggerStore , times ( 1 ) ) . deleteBotTrigger ( eq ( intent ) ) ; org . mockito . Mockito . verify ( botTriggersCache , times ( 1 ) ) . remove ( eq ( intent ) ) ; } deleteBotTrigger ( java . lang . String ) { try { botTriggerStore . deleteBotTrigger ( intent ) ; botTriggersCache . remove ( intent ) ; return javax . ws . rs . core . Response . ok ( ) . build ( ) ; } catch ( ai . labs . persistence . IResourceStore e ) { log . error ( e . getLocalizedMessage ( ) , e ) ; throw new javax . ws . rs . InternalServerErrorException ( e . getLocalizedMessage ( ) ) ; } }
org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) )
testGetAlert ( ) { try ( com . salesforce . dva . argus . sdk . ArgusService argusService = new com . salesforce . dva . argus . sdk . ArgusService ( getMockedClient ( "/AlertServiceTest.json" ) ) ) { com . salesforce . dva . argus . sdk . AlertService alertService = argusService . getAlertService ( ) ; com . salesforce . dva . argus . sdk . entity . Alert result = alertService . getAlert ( BigInteger . ONE ) ; com . salesforce . dva . argus . sdk . entity . Alert expected = _constructPersistedAlert ( ) ; "<AssertPlaceHolder>" ; } } _constructPersistedAlert ( ) { com . salesforce . dva . argus . sdk . entity . Alert alert = _constructUnpersistedAlert ( ) ; alert . setCreatedDate ( new java . util . Date ( 1472282830936L ) ) ; alert . setCreatedById ( BigInteger . ONE ) ; alert . setId ( BigInteger . ONE ) ; alert . setModifiedById ( BigInteger . ONE ) ; alert . setModifiedDate ( alert . getCreatedDate ( ) ) ; return alert ; }
org . junit . Assert . assertEquals ( expected , result )
more_than_one_parent_found ( ) { when ( update . getUpdatedObject ( ) ) . thenReturn ( net . ripe . db . whois . common . rpsl . RpslObject . parse ( "inetnum:<sp>fe80::/32" ) ) ; when ( ipv6Tree . findFirstLessSpecific ( any ( net . ripe . db . whois . common . ip . Ipv6Resource . class ) ) ) . thenReturn ( com . google . common . collect . Lists . < net . ripe . db . whois . common . iptree . Ipv6Entry > newArrayList ( ipv6Entry , ipv6Entry ) ) ; java . util . List < net . ripe . db . whois . common . rpsl . RpslObject > rpslObjects = subject . authenticate ( update , updateContext ) ; "<AssertPlaceHolder>" ; } empty ( ) { org . junit . Assert . assertThat ( subject . getMessages ( ) . getAllMessages ( ) , hasSize ( 0 ) ) ; }
org . junit . Assert . assertThat ( rpslObjects , org . hamcrest . core . Is . is ( org . hamcrest . Matchers . empty ( ) ) )
testIsGuidedDecisionTableEditableWhenDecisionTableIsEditable ( ) { final org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTableView . Presenter dtPresenter = mock ( GuidedDecisionTableView . Presenter . class ) ; final org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTablePresenter . Access access = mock ( GuidedDecisionTablePresenter . Access . class ) ; doReturn ( access ) . when ( dtPresenter ) . getAccess ( ) ; doReturn ( false ) . when ( access ) . isReadOnly ( ) ; doReturn ( true ) . when ( access ) . hasEditableColumns ( ) ; final boolean isGuidedDecisionTableEditable = presenter . isGuidedDecisionTableEditable ( dtPresenter ) ; "<AssertPlaceHolder>" ; } isGuidedDecisionTableEditable ( org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTableView$Presenter ) { final org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTablePresenter . Access access = decisionTablePresenter . getAccess ( ) ; final boolean decisionTableIsEditable = ! ( access . isReadOnly ( ) ) ; final boolean decisionTableHasEditableColumns = access . hasEditableColumns ( ) ; return decisionTableIsEditable && decisionTableHasEditableColumns ; }
org . junit . Assert . assertTrue ( isGuidedDecisionTableEditable )
testBatchCreate ( ) { java . util . List < com . vip . saturn . job . console . mybatis . entity . DashboardHistory > dashboardHistories = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { com . vip . saturn . job . console . mybatis . entity . DashboardHistory dashboardHistory = new com . vip . saturn . job . console . mybatis . entity . DashboardHistory ( "zk" , ( "type" + ( java . lang . String . valueOf ( i ) ) ) , "topic" , java . lang . String . valueOf ( i ) , new java . util . Date ( ) ) ; dashboardHistories . add ( dashboardHistory ) ; } dashboardHistoryRepository . batchCreateOrUpdateHistory ( dashboardHistories ) ; java . util . List < java . lang . String > zkClusters = new java . util . ArrayList ( ) ; zkClusters . add ( "zk" ) ; java . util . List < com . vip . saturn . job . console . mybatis . entity . DashboardHistory > result = dashboardHistoryRepository . selectByZkClustersAndTypeAndTopicAndFromStartDateToEndDate ( zkClusters , null , null , null , null ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 5 , result . size ( ) )
isLoggedIn_ReturnsTrueWhenEmailSet ( ) { env . setEmail ( org . jboss . test . capedwarf . testsuite . config . test . CapedwarfEnvironmentTest . USER_EMAIL ) ; "<AssertPlaceHolder>" ; } isLoggedIn ( ) { return ( email ) != null ; }
org . junit . Assert . assertTrue ( env . isLoggedIn ( ) )
convertXmlToObjectFromFile ( ) { java . lang . ClassLoader classLoader = getClass ( ) . getClassLoader ( ) ; java . io . FileReader reader = new java . io . FileReader ( classLoader . getResource ( "data-file-alias.xml" ) . getFile ( ) ) ; com . baeldung . pojo . Customer customer = ( ( com . baeldung . pojo . Customer ) ( xstream . fromXML ( reader ) ) ) ; "<AssertPlaceHolder>" ; } getFile ( ) { final java . io . InputStream in = getClass ( ) . getResourceAsStream ( "/com/baeldung/produceimage/data.txt" ) ; return org . apache . commons . io . IOUtils . toByteArray ( in ) ; }
org . junit . Assert . assertNotNull ( customer )
shouldGenerateRandomStringFromPattern ( ) { net . moznion . random . string . RandomStringGenerator generator = new net . moznion . random . string . RandomStringGenerator ( ) ; java . lang . String randomString = generator . generateFromPattern ( "cCn!.sb" ) ; java . util . regex . Pattern patternToProve = java . util . regex . Pattern . compile ( ( "^[a-z][A-Z][0-9][~`!@$%^&*()\\-_+={}\\[\\]|\\\\:;\"\'.<>?/#,]" + ( "[a-zA-Z0-9~`!@$%^&*()\\-_+={}\\[\\]|\\\\:;\"\'.<>?/#,]" + "[A-Za-z0-9./].$" ) ) ) ; "<AssertPlaceHolder>" ; } generateFromPattern ( java . lang . String ) { return java . util . Arrays . stream ( pattern . split ( "" ) ) . map ( ( patternCharacter ) -> { net . moznion . random . string . RandomLetterPicker picker ; switch ( patternCharacter ) { case "c" : picker = pickers . getLowerCase ( ) ; break ; case "C" : picker = pickers . getUpperCase ( ) ; break ; case "n" : picker = pickers . getDigit ( ) ; break ; case "!" : picker = pickers . getSymbol ( ) ; break ; case "." : picker = pickers . getAny ( ) ; break ; case "s" : picker = pickers . getSalt ( ) ; break ; case "b" : picker = pickers . getBinary ( ) ; break ; default : throw new java . lang . RuntimeException ( ( "Detected<sp>invalid<sp>pattern<sp>character:<sp>" + patternCharacter ) ) ; } return picker . pickRandomLetter ( ) ; } ) . collect ( java . util . stream . Collectors . joining ( ) ) ; }
org . junit . Assert . assertTrue ( patternToProve . matcher ( randomString ) . find ( ) )
isAbstractPredicateCreatorConstructorWorking ( ) { final java . lang . reflect . Constructor < com . uaihebert . uaicriteria . predicate . AbstractPredicateCreator > constructor = com . uaihebert . uaicriteria . predicate . AbstractPredicateCreator . class . getDeclaredConstructor ( new java . lang . Class [ 0 ] ) ; constructor . setAccessible ( true ) ; final com . uaihebert . uaicriteria . predicate . AbstractPredicateCreator object = constructor . newInstance ( new java . lang . Object [ 0 ] ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( object )
isCanonicalClassNameUsed_A$String$String$ClassMeta_NotUsed ( ) { java . lang . String expectedCanonicalClassName = "com.example.bean.SampleBean" ; java . lang . String usedClassName = "SampleBean" ; org . junithelper . core . meta . ClassMeta targetClassMeta = new org . junithelper . core . meta . ClassMeta ( ) ; boolean actual = org . junithelper . core . generator . GeneratorImplFunction . isCanonicalClassNameUsed ( expectedCanonicalClassName , usedClassName , targetClassMeta ) ; boolean expected = false ; "<AssertPlaceHolder>" ; } isCanonicalClassNameUsed ( java . lang . String , java . lang . String , org . junithelper . core . meta . ClassMeta ) { org . junithelper . core . util . Assertion . on ( "expectedCanonicalClassName" ) . mustNotBeNull ( expectedCanonicalClassName ) ; org . junithelper . core . util . Assertion . on ( "usedClassName" ) . mustNotBeNull ( usedClassName ) ; org . junithelper . core . util . Assertion . on ( "targetClassMeta" ) . mustNotBeNull ( targetClassMeta ) ; if ( ( usedClassName . equals ( expectedCanonicalClassName ) ) || ( usedClassName . equals ( expectedCanonicalClassName . replace ( "java.lang." , "" ) ) ) ) { return true ; } else { java . lang . String [ ] extSplitted = expectedCanonicalClassName . split ( "\\." ) ; java . lang . String extClassName = extSplitted [ ( ( extSplitted . length ) - 1 ) ] ; if ( usedClassName . equals ( extClassName ) ) { java . lang . String extInSamplePackage = ( ( targetClassMeta . packageName ) + "." ) + extClassName ; if ( extInSamplePackage . equals ( expectedCanonicalClassName ) ) { return true ; } else { for ( java . lang . String imported : targetClassMeta . importedList ) { java . lang . String target = expectedCanonicalClassName . replaceFirst ( extClassName , "" ) ; if ( ( imported . matches ( expectedCanonicalClassName ) ) || ( imported . matches ( ( target + ".+" ) ) ) ) { return true ; } } } } } return false ; }
org . junit . Assert . assertThat ( actual , is ( equalTo ( expected ) ) )
calculatePlannedInfusionBagChangeForContinuousInfusionWithStopTaskAfterEmptyBag ( ) { final java . lang . String patientId = "1" ; final java . lang . String therapyId = "therapy1" ; final com . marand . thinkmed . medications . dto . administration . InfusionBagDto infusionBagDto = new com . marand . thinkmed . medications . dto . administration . InfusionBagDto ( 1000.0 , "ml" ) ; final com . marand . maf . core . Pair < org . joda . time . DateTime , com . marand . thinkmed . medications . dto . administration . InfusionBagDto > lastInfusionBag = com . marand . maf . core . Pair . of ( new org . joda . time . DateTime ( 2016 , 1 , 20 , 2 , 0 , 0 ) , infusionBagDto ) ; final java . util . List < com . marand . thinkmed . medications . dto . administration . AdministrationDto > givenAdministrations = new java . util . ArrayList ( ) ; final com . marand . thinkmed . medications . dto . administration . StartAdministrationDto administrationDto = new com . marand . thinkmed . medications . dto . administration . StartAdministrationDto ( ) ; final com . marand . thinkmed . medications . dto . TherapyDoseDto administrationTherapyDoseDto = new com . marand . thinkmed . medications . dto . TherapyDoseDto ( ) ; administrationTherapyDoseDto . setTherapyDoseTypeEnum ( TherapyDoseTypeEnum . RATE ) ; administrationTherapyDoseDto . setSecondaryNumerator ( 100.0 ) ; administrationTherapyDoseDto . setSecondaryNumeratorUnit ( "mg" ) ; administrationTherapyDoseDto . setSecondaryDenominator ( 1.0 ) ; administrationTherapyDoseDto . setSecondaryDenominatorUnit ( "l" ) ; administrationTherapyDoseDto . setNumerator ( 10.0 ) ; administrationTherapyDoseDto . setNumeratorUnit ( "ml/h" ) ; administrationDto . setAdministrationId ( "Administration1" ) ; administrationDto . setAdministeredDose ( administrationTherapyDoseDto ) ; administrationDto . setAdministrationResult ( AdministrationResultEnum . GIVEN ) ; administrationDto . setAdministrationTime ( new org . joda . time . DateTime ( 2016 , 1 , 20 , 2 , 0 , 0 ) ) ; administrationDto . setTherapyId ( therapyId ) ; givenAdministrations . add ( administrationDto ) ; final com . marand . thinkmed . medications . dto . administration . AdjustInfusionAdministrationDto administrationDto2 = new com . marand . thinkmed . medications . dto . administration . AdjustInfusionAdministrationDto ( ) ; final com . marand . thinkmed . medications . dto . TherapyDoseDto administrationTherapyDoseDto2 = new com . marand . thinkmed . medications . dto . TherapyDoseDto ( ) ; administrationTherapyDoseDto2 . setTherapyDoseTypeEnum ( TherapyDoseTypeEnum . RATE ) ; administrationTherapyDoseDto2 . setNumerator ( 30.0 ) ; administrationTherapyDoseDto2 . setNumeratorUnit ( "ml/h" ) ; administrationDto2 . setAdministrationId ( "Administration2" ) ; administrationDto2 . setAdministeredDose ( administrationTherapyDoseDto2 ) ; administrationDto2 . setAdministrationResult ( AdministrationResultEnum . GIVEN ) ; administrationDto2 . setAdministrationTime ( new org . joda . time . DateTime ( 2016 , 1 , 20 , 5 , 0 , 0 ) ) ; administrationDto2 . setTherapyId ( therapyId ) ; givenAdministrations . add ( administrationDto2 ) ; final com . marand . thinkmed . medications . dto . administration . AdjustInfusionAdministrationDto administrationDto3 = new com . marand . thinkmed . medications . dto . administration . AdjustInfusionAdministrationDto ( ) ; final com . marand . thinkmed . medications . dto . TherapyDoseDto administrationTherapyDoseDto3 = new com . marand . thinkmed . medications . dto . TherapyDoseDto ( ) ; administrationTherapyDoseDto3 . setTherapyDoseTypeEnum ( TherapyDoseTypeEnum . RATE ) ; administrationTherapyDoseDto3 . setNumerator ( 40.0 ) ; administrationTherapyDoseDto3 . setNumeratorUnit ( "ml/h" ) ; administrationDto3 . setAdministrationId ( "Administration3" ) ; administrationDto3 . setAdministeredDose ( administrationTherapyDoseDto3 ) ; administrationDto3 . setAdministrationResult ( AdministrationResultEnum . GIVEN ) ; administrationDto3 . setAdministrationTime ( new org . joda . time . DateTime ( 2016 , 1 , 20 , 8 , 0 , 0 ) ) ; administrationDto3 . setTherapyId ( therapyId ) ; givenAdministrations . add ( administrationDto3 ) ; final com . marand . thinkmed . medications . dto . administration . StopAdministrationDto administrationDto4 = new com . marand . thinkmed . medications . dto . administration . StopAdministrationDto ( ) ; administrationDto4 . setAdministrationId ( "Administration4" ) ; administrationDto4 . setAdministrationResult ( AdministrationResultEnum . GIVEN ) ; administrationDto4 . setAdministrationTime ( new org . joda . time . DateTime ( 2016 , 1 , 21 , 10 , 0 , 0 ) ) ; administrationDto4 . setTherapyId ( therapyId ) ; givenAdministrations . add ( administrationDto4 ) ; final org . joda . time . DateTime dateTime = infusionBagHandler . calculatePlannedInfusionBagChangeForContinuousInfusion ( null , java . util . Collections . emptyList ( ) , givenAdministrations , infusionBagDto , lastInfusionBag . getFirst ( ) ) ; "<AssertPlaceHolder>" ; } calculatePlannedInfusionBagChangeForContinuousInfusion ( org . joda . time . DateTime , java . util . List , java . util . List , com . marand . thinkmed . medications . dto . administration . InfusionBagDto , org . joda . time . DateTime ) { final java . util . List < com . marand . thinkmed . medications . infusion . AdministrationCandidateDo > administrationCandidates = extractRelevantAdministrationCandidates ( notCompletedAdjustInfusionTasks , givenAdministrations , com . marand . maf . core . time . Intervals . infiniteFrom ( lastInfusionBagChangeTime ) ) ; java . lang . Double availableQuantity = lastInfusionBagDto . getQuantity ( ) ; org . joda . time . DateTime plannedInfusionBagTime = null ; for ( final com . marand . thinkmed . medications . infusion . AdministrationCandidateDo candidate : administrationCandidates ) { final com . marand . thinkmed . medications . dto . TherapyDoseDto therapyDoseDto = candidate . getTherapyDose ( ) ; final com . marand . thinkmed . medications . AdministrationTypeEnum administrationType = candidate . getAdministrationType ( ) ; if ( ( administrationType == ( com . marand . thinkmed . medications . AdministrationTypeEnum . BOLUS ) ) && ( candidate . getAdministrationTime ( ) . isAfter ( lastInfusionBagChangeTime ) ) ) { final java . lang . Double administrationQuantity = ( com . marand . thinkmed . medications . business . util . TherapyUnitsConverter . isLiquidUnit ( therapyDoseDto
org . junit . Assert . assertEquals ( new org . joda . time . DateTime ( 2016 , 1 , 21 , 6 , 0 , 0 ) , dateTime )
test ( ) { net . minidev . json . JSONObject objectToReduce = ( ( jsonToReduce ) != null ) ? ( ( net . minidev . json . JSONObject ) ( net . minidev . json . JSONValue . parseWithException ( jsonToReduce ) ) ) : null ; net . minidev . json . JSONObject expectedReducedObj = ( ( expectedReducedJson ) != null ) ? ( ( net . minidev . json . JSONObject ) ( net . minidev . json . JSONValue . parseWithException ( expectedReducedJson ) ) ) : null ; net . minidev . json . actions . PathsRetainer retainer = switchKeyToRemove ( ) . with ( new net . minidev . json . actions . path . DotDelimiter ( ) . withAcceptDelimiterInNodeName ( false ) ) ; net . minidev . json . JSONObject reducedObj = retainer . retain ( objectToReduce ) ; "<AssertPlaceHolder>" ; } retain ( net . minidev . json . JSONObject ) { net . minidev . json . actions . traverse . JSONTraverseAction locateAction = new net . minidev . json . actions . traverse . LocatePathsJsonAction ( pathsToRetain , pathDelimiter ) ; net . minidev . json . actions . traverse . JSONTraverser t1 = new net . minidev . json . actions . traverse . JSONTraverser ( locateAction ) ; t1 . traverse ( object ) ; java . util . List < java . lang . String > realPathsToRetain = ( ( java . util . List < java . lang . String > ) ( locateAction . result ( ) ) ) ; net . minidev . json . actions . traverse . JSONTraverseAction retainer = new net . minidev . json . actions . traverse . RetainPathsJsonAction ( realPathsToRetain , pathDelimiter ) ; net . minidev . json . actions . traverse . JSONTraverser t2 = new net . minidev . json . actions . traverse . JSONTraverser ( retainer ) . with ( pathDelimiter ) ; t2 . traverse ( object ) ; return ( ( net . minidev . json . JSONObject ) ( retainer . result ( ) ) ) ; }
org . junit . Assert . assertEquals ( expectedReducedObj , reducedObj )
testGetUserPreferredIIOImplementation ( ) { edu . illinois . library . cantaloupe . config . Configuration config = edu . illinois . library . cantaloupe . config . Configuration . getInstance ( ) ; config . setProperty ( JPEGImageReader . IMAGEIO_PLUGIN_CONFIG_KEY , "cats" ) ; "<AssertPlaceHolder>" ; } getUserPreferredIIOImplementation ( ) { edu . illinois . library . cantaloupe . config . Configuration config = edu . illinois . library . cantaloupe . config . Configuration . getInstance ( ) ; return config . getString ( edu . illinois . library . cantaloupe . processor . codec . png . PNGImageWriter . IMAGEIO_PLUGIN_CONFIG_KEY ) ; }
org . junit . Assert . assertEquals ( "cats" , ( ( edu . illinois . library . cantaloupe . processor . codec . JPEGImageReader ) ( instance ) ) . getUserPreferredIIOImplementation ( ) )
testGetIntHeaderNotFound ( org . apache . servicecomb . common . rest . definition . RestParam ) { new mockit . Expectations ( ) { { swaggerOperation . getParamByName ( "name" ) ; result = restParam ; restParam . getValue ( args ) ; result = null ; } } ; "<AssertPlaceHolder>" ; } getIntHeader ( java . lang . String ) { java . lang . String header = this . vertxRequest . getHeader ( name ) ; if ( header == null ) { return - 1 ; } return java . lang . Integer . parseInt ( header ) ; }
org . junit . Assert . assertEquals ( ( - 1 ) , request . getIntHeader ( "name" ) )
decode ( ) { final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( encoded ) ; final com . flagstone . transform . coder . SWFDecoder decoder = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; final com . flagstone . transform . coder . Context context = new com . flagstone . transform . coder . Context ( ) ; fixture = new com . flagstone . transform . shape . ShapeStyle ( decoder . readBits ( 6 , false ) , decoder , context ) ; "<AssertPlaceHolder>" ; } readBits ( int , boolean ) { int pointer = ( ( index ) << ( com . flagstone . transform . coder . SWFDecoder . BYTES_TO_BITS ) ) + ( offset ) ; if ( ( ( ( size ) << ( com . flagstone . transform . coder . SWFDecoder . BYTES_TO_BITS ) ) - pointer ) < numberOfBits ) { fill ( ) ; pointer = ( ( index ) << ( com . flagstone . transform . coder . SWFDecoder . BYTES_TO_BITS ) ) + ( offset ) ; } int value = 0 ; if ( numberOfBits > 0 ) { if ( ( pointer + numberOfBits ) > ( ( size ) << ( com . flagstone . transform . coder . SWFDecoder . BYTES_TO_BITS ) ) ) { throw new java . lang . ArrayIndexOutOfBoundsException ( ) ; } for ( int i = com . flagstone . transform . coder . SWFDecoder . BITS_PER_INT ; ( i > 0 ) && ( ( index ) < ( buffer . length ) ) ; i -= com . flagstone . transform . coder . SWFDecoder . BITS_PER_BYTE ) { value |= ( ( buffer [ ( ( index ) ++ ) ] ) & ( com . flagstone . transform . coder . SWFDecoder . BYTE_MASK ) ) << ( i - ( com . flagstone . transform . coder . SWFDecoder . BITS_PER_BYTE ) ) ; } value <<= offset ; if ( signed ) { value >>= ( com . flagstone . transform . coder . SWFDecoder . BITS_PER_INT ) - numberOfBits ; } else { value >>>= ( com . flagstone . transform . coder . SWFDecoder . BITS_PER_INT ) - numberOfBits ; } pointer += numberOfBits ; index = pointer > > > ( com . flagstone . transform . coder . SWFDecoder . BITS_TO_BYTES ) ; offset = pointer & ( Coder . LOWEST3 ) ; } return value ; }
org . junit . Assert . assertNotNull ( fixture )
testPostDirectMessageWithNullMessage ( ) { org . xwiki . eventstream . Event postedMessage = setupForDirectMessage ( ) ; this . stream . postDirectMessageToUser ( null , this . targetUser ) ; "<AssertPlaceHolder>" ; } getBody ( ) { return this . body ; }
org . junit . Assert . assertEquals ( null , postedMessage . getBody ( ) )
testBPInitErrorHandling ( ) { final org . apache . hadoop . hdfs . server . datanode . DataNode mockDn = org . mockito . Mockito . mock ( org . apache . hadoop . hdfs . server . datanode . DataNode . class ) ; org . mockito . Mockito . doReturn ( true ) . when ( mockDn ) . shouldRun ( ) ; org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; java . io . File dnDataDir = new java . io . File ( new java . io . File ( org . apache . hadoop . hdfs . server . datanode . TestBPOfferService . TEST_BUILD_DATA , "testBPInitErrorHandling" ) , "data" ) ; conf . set ( org . apache . hadoop . hdfs . DFSConfigKeys . DFS_DATANODE_DATA_DIR_KEY , dnDataDir . toURI ( ) . toString ( ) ) ; org . mockito . Mockito . doReturn ( conf ) . when ( mockDn ) . getConf ( ) ; org . mockito . Mockito . doReturn ( new org . apache . hadoop . hdfs . server . datanode . DNConf ( mockDn ) ) . when ( mockDn ) . getDnConf ( ) ; org . mockito . Mockito . doReturn ( org . apache . hadoop . hdfs . server . datanode . metrics . DataNodeMetrics . create ( conf , "fake<sp>dn" ) ) . when ( mockDn ) . getMetrics ( ) ; final java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( ) ; org . mockito . Mockito . doAnswer ( new org . mockito . stubbing . Answer < java . lang . Void > ( ) { @ org . apache . hadoop . hdfs . server . datanode . Override public org . apache . hadoop . hdfs . server . datanode . Void answer ( org . mockito . invocation . InvocationOnMock invocation ) throws java . lang . Throwable { if ( ( count . getAndIncrement ( ) ) == 0 ) { throw new java . io . IOException ( "faked<sp>initBlockPool<sp>exception" ) ; } org . mockito . Mockito . doReturn ( mockFSDataset ) . when ( mockDn ) . getFSDataset ( ) ; return null ; } } ) . when ( mockDn ) . initBlockPool ( org . mockito . Mockito . any ( org . apache . hadoop . hdfs . server . datanode . BPOfferService . class ) ) ; org . apache . hadoop . hdfs . server . datanode . BPOfferService bpos = setupBPOSForNNs ( mockDn , mockNN1 , mockNN2 ) ; java . util . List < org . apache . hadoop . hdfs . server . datanode . BPServiceActor > actors = bpos . getBPServiceActors ( ) ; "<AssertPlaceHolder>" ; bpos . start ( ) ; try { waitForInitialization ( bpos ) ; waitForBlockReport ( mockNN1 , mockNN2 ) ; } finally { bpos . stop ( ) ; bpos . join ( ) ; } } size ( ) { return loggers . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , actors . size ( ) )
updateFlag ( ) { java . lang . Integer tenantId = 1 ; java . lang . Integer houseId = 4 ; com . micro . rent . pc . entity . Favorite favorite = favoriteService . getFavoriteHouse ( tenantId , houseId ) ; if ( favorite != null ) { java . lang . Integer id = favorite . getId ( ) ; java . lang . String flag = favorite . getFlag ( ) ; char f = favoriteService . changeFavoriteFlag ( id , flag ) ; "<AssertPlaceHolder>" ; } } changeFavoriteFlag ( java . lang . Integer , java . lang . String ) { com . micro . rent . pc . entity . Favorite favorite = new com . micro . rent . pc . entity . Favorite ( ) ; favorite . setId ( id ) ; char f = flag . charAt ( 0 ) ; if ( f == '0' ) { f = '1' ; } else { f = '0' ; } favorite . setFlag ( ( f + "" ) ) ; favoriteDao . updateFavoriteFlagById ( favorite ) ; return f ; }
org . junit . Assert . assertNotNull ( f )
testClose ( ) { try { instance . close ( ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } close ( ) { byteBuf . release ( ) ; }
org . junit . Assert . assertTrue ( false )
repro ( ) { org . springframework . context . support . GenericXmlApplicationContext ctx = new org . springframework . context . support . GenericXmlApplicationContext ( ) ; ctx . load ( "classpath:org/springframework/issues/ReproTests-context.xml" ) ; ctx . refresh ( ) ; org . springframework . issues . Foo foo = ctx . getBean ( org . springframework . issues . Foo . class ) ; "<AssertPlaceHolder>" ; } isMogoSlaveOk ( ) { return mogoSlaveOk ; }
org . junit . Assert . assertThat ( foo . isMogoSlaveOk ( ) , org . hamcrest . CoreMatchers . equalTo ( true ) )
checkHandlesMoveColumnsToWithSingleMetadata ( ) { final org . drools . workbench . screens . guided . dtable . client . widget . table . model . synchronizers . impl . BaseSynchronizer . MoveColumnToMetaData md0 = mock ( org . drools . workbench . screens . guided . dtable . client . widget . table . model . synchronizers . impl . BaseSynchronizer . MoveColumnToMetaData . class ) ; final org . drools . workbench . screens . guided . dtable . client . widget . table . model . synchronizers . impl . AttributeColumnSynchronizer synchronizer = new org . drools . workbench . screens . guided . dtable . client . widget . table . model . synchronizers . impl . AttributeColumnSynchronizer ( ) ; when ( md0 . getColumn ( ) ) . thenReturn ( mock ( org . drools . workbench . models . guided . dtable . shared . model . AttributeCol52 . class ) ) ; "<AssertPlaceHolder>" ; } handlesMoveColumnsTo ( java . util . List ) { return isBRLFragment ( metaData ) ; }
org . junit . Assert . assertTrue ( synchronizer . handlesMoveColumnsTo ( java . util . Collections . singletonList ( md0 ) ) )
testBondNotT ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( NOT , new org . openscience . cdk . isomorphism . matchers . Expr ( TRUE ) , null ) ; org . openscience . cdk . interfaces . IBond bond = mock ( org . openscience . cdk . interfaces . IBond . class ) ; "<AssertPlaceHolder>" ; } matches ( org . openscience . cdk . interfaces . IAtomContainer ) { return matches ( atomContainer , true ) ; }
org . junit . Assert . assertFalse ( expr . matches ( bond ) )
writes_index_html ( ) { writeReport ( ) ; java . net . URL indexHtml = new java . net . URL ( outputDir , "index.html" ) ; org . jsoup . nodes . Document document = org . jsoup . Jsoup . parse ( new java . io . File ( indexHtml . getFile ( ) ) , "UTF-8" ) ; org . jsoup . nodes . Element reportElement = document . body ( ) . getElementsByClass ( "cucumber-report" ) . first ( ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String , java . util . Collection ) { return io . cucumber . core . model . FeatureWithLines . create ( io . cucumber . core . model . FeaturePath . parse ( uri ) , lines ) ; }
org . junit . Assert . assertEquals ( "" , reportElement . text ( ) )
testGetNamesReturnsTheParametersInTheOrderTheyWhereFirstAdded ( ) { com . gistlabs . mechanize . parameters . Parameters parameters = new com . gistlabs . mechanize . parameters . Parameters ( ) . add ( "name2" , "value" ) . add ( "name" , "value" ) ; "<AssertPlaceHolder>" ; } getNames ( ) { java . lang . String [ ] result = new java . lang . String [ parameters . size ( ) ] ; parameters . keySet ( ) . toArray ( result ) ; return result ; }
org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "name2" , "name" } , parameters . getNames ( ) )
test_getText ( ) { org . eclipse . swt . graphics . TextLayout layout = new org . eclipse . swt . graphics . TextLayout ( display ) ; java . lang . String text = "Test" ; layout . setText ( text ) ; "<AssertPlaceHolder>" ; layout . dispose ( ) ; } getText ( ) { java . util . List < org . eclipse . swt . accessibility . AccessibleControlListener > listeners = accessible . accessibleControlListeners ; int length = org . eclipse . swt . accessibility . AccessibleObject . size ( listeners ) ; if ( length > 0 ) { java . lang . String parentText = "" ; org . eclipse . swt . accessibility . AtkTextIface iface = org . eclipse . swt . accessibility . AccessibleObject . getParentTextIface ( atkHandle ) ; if ( ( iface != null ) && ( ( iface . get_character_count ) != 0 ) ) { long characterCount = org . eclipse . swt . accessibility . ATK . call ( iface . get_character_count , atkHandle ) ; if ( ( characterCount > 0 ) && ( ( iface . get_text ) != 0 ) ) { long parentResult = org . eclipse . swt . accessibility . ATK . call ( iface . get_text , atkHandle , 0 , characterCount ) ; if ( parentResult != 0 ) { parentText = org . eclipse . swt . accessibility . AccessibleObject . getString ( parentResult ) ; org . eclipse . swt . accessibility . OS . g_free ( parentResult ) ; } } } org . eclipse . swt . accessibility . AccessibleControlEvent event = new org . eclipse . swt . accessibility . AccessibleControlEvent ( accessible ) ; event . childID = id ; event . result = parentText ; for ( int i = 0 ; i < length ; i ++ ) { org . eclipse . swt . accessibility . AccessibleControlListener listener = listeners . get ( i ) ; listener . getValue ( event ) ; } return event . result ; } return null ; }
org . junit . Assert . assertEquals ( text , layout . getText ( ) )
testInitFunctions ( ) { final org . dswarm . persistence . service . MaintainDBService maintainDBService = GuicedTest . injector . getInstance ( org . dswarm . persistence . service . MaintainDBService . class ) ; try { maintainDBService . truncateTables ( ) ; maintainDBService . initFunctions ( ) ; } catch ( final org . dswarm . persistence . DMPPersistenceException e ) { "<AssertPlaceHolder>" ; } } initFunctions ( ) { final javax . persistence . EntityManager entityManager = acquire ( false ) ; org . dswarm . persistence . service . MaintainDBService . LOG . debug ( "try<sp>to<sp>initialize<sp>the<sp>functions<sp>in<sp>the<sp>DB" ) ; executeSQLScriptLineWise ( "functions.sql" , entityManager ) ; org . dswarm . persistence . service . MaintainDBService . LOG . debug ( "initialized<sp>the<sp>functions<sp>in<sp>the<sp>DB" ) ; }
org . junit . Assert . assertFalse ( true )
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . social . kernel . model . SocialActivity > socialActivities = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( socialActivities . isEmpty ( ) )
visitAndMatchExpr_expandAnd ( ) { org . batfish . datamodel . acl . AclLineMatchExpr expr = org . batfish . datamodel . acl . AclLineMatchExprs . and ( org . batfish . datamodel . acl . AclLineMatchExprNormalizerTest . A , org . batfish . datamodel . acl . AclLineMatchExprs . and ( org . batfish . datamodel . acl . AclLineMatchExprNormalizerTest . B , org . batfish . datamodel . acl . AclLineMatchExprNormalizerTest . C ) ) ; org . batfish . datamodel . acl . AclLineMatchExpr nf = org . batfish . datamodel . acl . AclLineMatchExprs . and ( org . batfish . datamodel . acl . AclLineMatchExprNormalizerTest . A , org . batfish . datamodel . acl . AclLineMatchExprNormalizerTest . B , org . batfish . datamodel . acl . AclLineMatchExprNormalizerTest . C ) ; "<AssertPlaceHolder>" ; } normalize ( org . batfish . datamodel . acl . AclLineMatchExpr ) { return org . batfish . datamodel . acl . AclLineMatchExprNormalizer . normalize ( _toBDD , expr ) ; }
org . junit . Assert . assertThat ( normalize ( expr ) , org . hamcrest . Matchers . equalTo ( nf ) )
testGetId ( ) { org . eclipse . rap . rwt . internal . lifecycle . RemoteAdapter adapter = mock ( org . eclipse . rap . rwt . internal . lifecycle . RemoteAdapter . class ) ; when ( adapter . getId ( ) ) . thenReturn ( "test.id" ) ; org . eclipse . swt . widgets . Widget widget = mock ( org . eclipse . swt . widgets . Widget . class ) ; when ( widget . getAdapter ( org . eclipse . rap . rwt . internal . lifecycle . RemoteAdapter . class ) ) . thenReturn ( adapter ) ; java . lang . String id = org . eclipse . rap . rwt . widgets . WidgetUtil . getId ( widget ) ; "<AssertPlaceHolder>" ; } getId ( org . eclipse . swt . widgets . Widget ) { return org . eclipse . rap . rwt . internal . lifecycle . WidgetUtil . getId ( widget ) ; }
org . junit . Assert . assertEquals ( "test.id" , id )
should_get_name ( ) { fr . norad . visuwall . providers . teamcity . resource . TeamCityBuildType project = new fr . norad . visuwall . providers . teamcity . resource . TeamCityBuildType ( ) ; project . setName ( "name" ) ; when ( teamCity . findBuildType ( anyString ( ) ) ) . thenReturn ( project ) ; fr . norad . visuwall . api . domain . SoftwareProjectId softwareProjectId = new fr . norad . visuwall . api . domain . SoftwareProjectId ( "projectId" ) ; java . lang . String name = teamCityConnection . getName ( softwareProjectId ) ; "<AssertPlaceHolder>" ; } getName ( fr . norad . visuwall . api . domain . SoftwareProjectId ) { checkConnected ( ) ; checkSoftwareProjectId ( softwareProjectId ) ; java . lang . String projectName = softwareProjectId . getProjectId ( ) ; try { fr . norad . visuwall . providers . hudson . domain . HudsonJob project = hudson . findJob ( projectName ) ; return project . getName ( ) ; } catch ( fr . norad . visuwall . providers . hudson . exception . HudsonJobNotFoundException e ) { throw new fr . norad . visuwall . api . exception . ProjectNotFoundException ( ( "Can't<sp>get<sp>name<sp>of<sp>project<sp>" + softwareProjectId ) , e ) ; } }
org . junit . Assert . assertEquals ( "name" , name )
testHashCodeIsSameForSelf ( ) { fixio . events . LogonEvent LogonEvent = new fixio . events . LogonEvent ( session1 ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return session . hashCode ( ) ; }
org . junit . Assert . assertEquals ( LogonEvent . hashCode ( ) , LogonEvent . hashCode ( ) )
zRangeByScoreTest ( ) { connection . zAdd ( "myzset" , 1 , "one" ) ; connection . zAdd ( "myzset" , 2 , "two" ) ; connection . zAdd ( "myzset" , 3 , "three" ) ; java . util . Set < byte [ ] > zRangeByScore = connection . zRangeByScore ( "myzset" , "(1" , "2" ) ; "<AssertPlaceHolder>" ; } iterator ( ) { java . util . List < E > list = content ( ) ; checkResult ( list ) ; return new DefaultRedisListIterator ( list . iterator ( ) ) ; }
org . junit . Assert . assertEquals ( "two" , new java . lang . String ( zRangeByScore . iterator ( ) . next ( ) ) )
testCronExpressionBeforeHalf ( ) { final com . cronutils . model . definition . CronDefinition cronDefinition = com . cronutils . model . definition . CronDefinitionBuilder . defineCron ( ) . withSeconds ( ) . and ( ) . withMinutes ( ) . and ( ) . withHours ( ) . and ( ) . withDayOfMonth ( ) . and ( ) . withMonth ( ) . and ( ) . withDayOfWeek ( ) . withValidRange ( 0 , 7 ) . withMondayDoWValue ( 1 ) . withIntMapping ( 7 , 0 ) . and ( ) . instance ( ) ; final com . cronutils . parser . CronParser parser = new com . cronutils . parser . CronParser ( cronDefinition ) ; final com . cronutils . model . Cron cron = parser . parse ( "0/30<sp>*<sp>*<sp>*<sp>*<sp>*" ) ; final java . time . ZonedDateTime startDateTime = java . time . ZonedDateTime . of ( 2015 , 8 , 28 , 12 , 5 , 14 , 0 , com . cronutils . model . time . UTC ) ; final java . time . ZonedDateTime expectedDateTime = java . time . ZonedDateTime . of ( 2015 , 8 , 28 , 12 , 5 , 30 , 0 , com . cronutils . model . time . UTC ) ; final com . cronutils . model . time . ExecutionTime executionTime = com . cronutils . model . time . ExecutionTime . forCron ( cron ) ; final java . util . Optional < java . time . ZonedDateTime > nextExecution = executionTime . nextExecution ( startDateTime ) ; if ( nextExecution . isPresent ( ) ) { "<AssertPlaceHolder>" ; } else { org . junit . Assert . fail ( com . cronutils . model . time . ExecutionTimeCustomDefinitionIntegrationTest . NEXT_EXECUTION_NOT_PRESENT_ERROR ) ; } } nextExecution ( java . time . ZonedDateTime ) { com . cronutils . utils . Preconditions . checkNotNull ( date ) ; try { java . time . ZonedDateTime nextMatch = nextClosestMatch ( date ) ; if ( nextMatch . equals ( date ) ) { nextMatch = nextClosestMatch ( date . plusSeconds ( 1 ) ) ; } return java . util . Optional . of ( nextMatch ) ; } catch ( final com . cronutils . model . time . generator . NoSuchValueException e ) { return java . util . Optional . empty ( ) ; } }
org . junit . Assert . assertEquals ( expectedDateTime , nextExecution . get ( ) )
testSetAttributeToNull ( ) { javax . cache . configuration . MutableConfiguration < java . lang . String , java . lang . String > config = new javax . cache . configuration . MutableConfiguration < java . lang . String , java . lang . String > ( ) ; try { config . setTypes ( null , java . lang . String . class ) ; org . junit . Assert . fail ( "null<sp>poiner<sp>exception<sp>expected" ) ; } catch ( java . lang . NullPointerException e ) { } try { config . setTypes ( java . lang . String . class , null ) ; org . junit . Assert . fail ( "null<sp>poiner<sp>exception<sp>expected" ) ; } catch ( java . lang . NullPointerException e ) { } try { config . addCacheEntryListenerConfiguration ( null ) ; org . junit . Assert . fail ( "null<sp>poiner<sp>exception<sp>expected" ) ; } catch ( java . lang . NullPointerException e ) { } try { config . setExpiryPolicyFactory ( null ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . NullPointerException e ) { org . junit . Assert . fail ( "should<sp>not<sp>throw<sp>NullPointerException<sp>when<sp>setting<sp>ExpiryPolicyFactory<sp>to<sp>null" ) ; } } getExpiryPolicyFactory ( ) { return null ; }
org . junit . Assert . assertNotNull ( config . getExpiryPolicyFactory ( ) )
addBlacklistedParameter ( ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap ( ) ; org . apache . sling . testing . mock . sling . servlet . MockSlingHttpServletRequest request = context . request ( ) ; request . setParameterMap ( com . google . common . collect . ImmutableMap . < java . lang . String , java . lang . Object > builder ( ) . put ( "wcmmode" , "preview" ) . build ( ) ) ; com . adobe . acs . commons . contentfinder . querybuilder . impl . viewhandler . GQLToQueryBuilderConverter . addProperty ( request , map , "wcmmode" , 1 ) ; "<AssertPlaceHolder>" ; } size ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 0 , map . size ( ) )
testGetNull ( ) { com . eclipsesource . v8 . V8Object v8Object = v8 . executeObjectScript ( "x<sp>=<sp>{a<sp>:<sp>null};<sp>x;" ) ; "<AssertPlaceHolder>" ; v8Object . close ( ) ; } getObject ( java . lang . String ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertNull ( v8Object . getObject ( "a" ) )
findByGuestIdAndOrgCaseInsensitive ( ) { java . lang . String guestId = "GuEsTiD" ; org . candlepin . model . Consumer consumer = new org . candlepin . model . Consumer ( "testConsumer" , "testUser" , owner , ct ) ; consumer . addGuestId ( new org . candlepin . model . GuestId ( guestId ) ) ; consumerCurator . create ( consumer ) ; org . candlepin . model . GuestId result = curator . findByGuestIdAndOrg ( guestId . toUpperCase ( ) , owner . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( new org . candlepin . model . GuestId ( guestId ) , result )
testDataServiceCanFetchCategories ( ) { "<AssertPlaceHolder>" ; } getAllCategories ( ) { return categories ; }
org . junit . Assert . assertFalse ( service . getAllCategories ( ) . isEmpty ( ) )
testDoNotFallDown ( ) { com . tacitknowledge . flip . aspectj . converters . Converter converter1 = mock ( com . tacitknowledge . flip . aspectj . converters . Converter . class ) ; when ( converter1 . getManagedClasses ( ) ) . thenReturn ( new java . lang . Class [ ] { java . util . List . class } ) ; handler . addConverter ( converter1 ) ; "<AssertPlaceHolder>" ; } getConverter ( java . lang . Class ) { return converters . get ( klass ) ; }
org . junit . Assert . assertEquals ( converter1 , handler . getConverter ( java . util . List . class ) )
test62 ( ) { net . pms . formats . FLAC fLAC0 = new net . pms . formats . FLAC ( ) ; java . lang . String [ ] str_array1 = fLAC0 . getSupportedExtensions ( ) ; "<AssertPlaceHolder>" ; } getSupportedExtensions ( ) { return new java . lang . String [ ] { "ogg" , "ogm" , "ogv" } ; }
org . junit . Assert . assertNotNull ( str_array1 )
testStreamXmlRecordReader ( ) { org . apache . hadoop . mapreduce . Job job = org . apache . hadoop . mapreduce . Job . getInstance ( ) ; org . apache . hadoop . conf . Configuration conf = job . getConfiguration ( ) ; job . setJarByClass ( org . apache . hadoop . streaming . mapreduce . TestStreamXmlRecordReader . class ) ; job . setMapperClass ( org . apache . hadoop . mapreduce . Mapper . class ) ; conf . set ( "stream.recordreader.class" , "org.apache.hadoop.streaming.mapreduce.StreamXmlRecordReader" ) ; conf . set ( "stream.recordreader.begin" , "<PATTERN>" ) ; conf . set ( "stream.recordreader.end" , "</PATTERN>" ) ; job . setInputFormatClass ( org . apache . hadoop . streaming . mapreduce . StreamInputFormat . class ) ; job . setMapOutputKeyClass ( org . apache . hadoop . io . Text . class ) ; job . setMapOutputValueClass ( org . apache . hadoop . io . Text . class ) ; job . setOutputKeyClass ( org . apache . hadoop . io . Text . class ) ; job . setOutputValueClass ( org . apache . hadoop . io . Text . class ) ; org . apache . hadoop . mapreduce . lib . input . FileInputFormat . addInputPath ( job , new org . apache . hadoop . fs . Path ( "target/input.xml" ) ) ; OUTPUT_DIR = new org . apache . hadoop . fs . Path ( "target/output" ) ; fs = org . apache . hadoop . fs . FileSystem . get ( conf ) ; if ( fs . exists ( OUTPUT_DIR ) ) { fs . delete ( OUTPUT_DIR , true ) ; } org . apache . hadoop . mapreduce . lib . output . FileOutputFormat . setOutputPath ( job , OUTPUT_DIR ) ; boolean ret = job . waitForCompletion ( true ) ; "<AssertPlaceHolder>" ; checkOutput ( ) ; } waitForCompletion ( boolean ) { if ( ( state ) == ( org . apache . hadoop . mapreduce . Job . JobState . DEFINE ) ) { submit ( ) ; } if ( verbose ) { monitorAndPrintJob ( ) ; } else { int completionPollIntervalMillis = org . apache . hadoop . mapreduce . Job . getCompletionPollInterval ( cluster . getConf ( ) ) ; while ( ! ( isComplete ( ) ) ) { try { java . lang . Thread . sleep ( completionPollIntervalMillis ) ; } catch ( java . lang . InterruptedException ie ) { } } } return isSuccessful ( ) ; }
org . junit . Assert . assertEquals ( true , ret )
testSimpleQuery ( ) { insertRandom ( 10 , "employee" ) ; final com . spotify . asyncdatastoreclient . Query get = com . spotify . asyncdatastoreclient . QueryBuilder . query ( ) . kindOf ( "employee" ) ; final java . util . List < com . spotify . asyncdatastoreclient . Entity > entities = datastore . execute ( get ) . getAll ( ) ; "<AssertPlaceHolder>" ; } getAll ( ) { return entities ; }
org . junit . Assert . assertEquals ( 10 , entities . size ( ) )
testElapsedTime ( ) { long startTime = java . lang . System . nanoTime ( ) ; com . sapher . youtubedl . YoutubeDLRequest request = new com . sapher . youtubedl . YoutubeDLRequest ( ) ; request . setOption ( "version" ) ; com . sapher . youtubedl . YoutubeDLResponse response = com . sapher . youtubedl . YoutubeDL . execute ( request ) ; int elapsedTime = ( ( int ) ( ( java . lang . System . nanoTime ( ) ) - startTime ) ) ; "<AssertPlaceHolder>" ; } getElapsedTime ( ) { return elapsedTime ; }
org . junit . Assert . assertTrue ( ( elapsedTime > ( response . getElapsedTime ( ) ) ) )
simple_get_with_non_proxy_host ( ) { com . atlassian . httpclient . apache . httpcomponents . ApacheAsyncHttpClientTest . ProxyTestHandler testHandler = new com . atlassian . httpclient . apache . httpcomponents . ApacheAsyncHttpClientTest . ProxyTestHandler ( ) ; prepare ( testHandler ) ; jenkins . model . Jenkins . getInstance ( ) . proxy = new hudson . ProxyConfiguration ( "localhost" , connector . getLocalPort ( ) , "foo" , "bar" , "www.apache.org" ) ; com . atlassian . httpclient . apache . httpcomponents . ApacheAsyncHttpClient httpClient = new com . atlassian . httpclient . apache . httpcomponents . ApacheAsyncHttpClient ( null , buildApplicationProperties ( ) , new com . atlassian . httpclient . apache . httpcomponents . ApacheAsyncHttpClientTest . NoOpThreadLocalContextManager ( ) , new com . atlassian . httpclient . api . factory . HttpClientOptions ( ) ) ; com . atlassian . httpclient . api . Response response = httpClient . newRequest ( "http://www.apache.org" ) . get ( ) . get ( 30 , TimeUnit . SECONDS ) ; "<AssertPlaceHolder>" ; } getStatusCode ( ) { return statusCode ; }
org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) )
test_createMissingFactoryMethodMessage ( ) { java . lang . String message = org . switchyard . transform . jaxb . internal . JAXBTransformerFactory . createMissingFactoryMethodMessage ( org . switchyard . transform . jaxb . internal . USAddress . class , org . switchyard . transform . jaxb . internal . ObjectFactory . class ) ; boolean messageContains = message . contains ( "SWITCHYARD016840" ) ; "<AssertPlaceHolder>" ; } createMissingFactoryMethodMessage ( java . lang . Class , java . lang . Class ) { java . lang . StringBuilder messageBuilder = new java . lang . StringBuilder ( ) ; java . lang . reflect . Method [ ] factoryMethods = objectFactory . getDeclaredMethods ( ) ; messageBuilder . append ( TransformMessages . MESSAGES . noJAXBElementFactoryDefined ( type . getName ( ) , objectFactory . getName ( ) ) ) ; for ( java . lang . reflect . Method factoryMethod : factoryMethods ) { javax . xml . bind . annotation . XmlElementDecl xmlElementDecl = factoryMethod . getAnnotation ( javax . xml . bind . annotation . XmlElementDecl . class ) ; if ( xmlElementDecl != null ) { java . lang . Class < ? > [ ] factoryParams = factoryMethod . getParameterTypes ( ) ; if ( ( factoryParams . length ) == 1 ) { javax . xml . namespace . QName qName = new javax . xml . namespace . QName ( xmlElementDecl . namespace ( ) , xmlElementDecl . name ( ) ) ; java . lang . Class < ? > factoryParam = factoryParams [ 0 ] ; messageBuilder . append ( ( ( ( "\n\t\t-<sp>Message<sp>QName:<sp>\'" + ( qName . toString ( ) ) ) + "'.<sp>Java<sp>Type:<sp>" ) + ( factoryParam . getName ( ) ) ) ) ; } } } return messageBuilder . toString ( ) ; }
org . junit . Assert . assertTrue ( messageContains )
_string_env ( ) { environment . set ( "ENV_FOR_TEST" , "abc" ) ; io . jenkins . plugins . casc . Configurator c = io . jenkins . plugins . casc . impl . configurators . PrimitiveConfiguratorTest . registry . lookupOrFail ( java . lang . String . class ) ; final java . lang . Object value = c . configure ( new io . jenkins . plugins . casc . model . Scalar ( "${ENV_FOR_TEST}" ) , io . jenkins . plugins . casc . impl . configurators . PrimitiveConfiguratorTest . context ) ; "<AssertPlaceHolder>" ; } configure ( io . jenkins . plugins . casc . model . CNode , io . jenkins . plugins . casc . ConfigurationContext ) { T object = super . configure ( c , context ) ; for ( java . lang . reflect . Method method : target . getMethods ( ) ) { if ( ( ( method . getParameterCount ( ) ) == 0 ) && ( ( method . getAnnotation ( javax . annotation . PostConstruct . class ) ) != null ) ) { try { method . invoke ( object , null ) ; } catch ( java . lang . IllegalAccessException | java . lang . reflect . InvocationTargetException e ) { throw new io . jenkins . plugins . casc . ConfiguratorException ( this , ( "Failed<sp>to<sp>invoke<sp>configurator<sp>method<sp>" + method ) , e ) ; } } } return object ; }
org . junit . Assert . assertEquals ( "abc" , value )
testGetLastPublishDateNotFromLastPublishDate ( ) { com . liferay . exportimport . kernel . lar . PortletDataContext portletDataContext = ( ( com . liferay . exportimport . kernel . lar . PortletDataContext ) ( com . liferay . exportimport . test . ExportImportDateUtilTest . _constructor . newInstance ( ( ( java . lang . Object ) ( null ) ) ) ) ) ; portletDataContext . setGroupId ( _group . getGroupId ( ) ) ; java . util . Date portletDataContextLastPublishDate = new java . util . Date ( ) ; updateLastPublishDate ( portletDataContext , ExportImportDateUtil . RANGE_ALL , portletDataContextLastPublishDate ) ; java . util . Date portletLastPublishDate = new java . util . Date ( ) ; updateLastPublishDate ( _portletPreferences , portletLastPublishDate ) ; java . util . Date lastPublishDate = com . liferay . exportimport . kernel . lar . ExportImportDateUtil . getLastPublishDate ( portletDataContext , _portletPreferences ) ; "<AssertPlaceHolder>" ; } getLastPublishDate ( com . liferay . exportimport . kernel . lar . PortletDataContext , javax . portlet . PortletPreferences ) { java . lang . String range = com . liferay . portal . kernel . util . MapUtil . getString ( portletDataContext . getParameterMap ( ) , com . liferay . exportimport . kernel . lar . ExportImportDateUtil . RANGE ) ; if ( range . equals ( com . liferay . exportimport . kernel . lar . ExportImportDateUtil . RANGE_FROM_LAST_PUBLISH_DATE ) ) { java . util . Date portletLastPublishDate = com . liferay . exportimport . kernel . lar . ExportImportDateUtil . getLastPublishDate ( jxPortletPreferences ) ; if ( portletLastPublishDate == null ) { return null ; } if ( ( portletDataContext . getStartDate ( ) ) == null ) { return portletLastPublishDate ; } if ( portletLastPublishDate . before ( portletDataContext . getStartDate ( ) ) ) { return portletLastPublishDate ; } } return portletDataContext . getStartDate ( ) ; }
org . junit . Assert . assertEquals ( portletDataContextLastPublishDate , lastPublishDate )
readAsLineList_A$InputStream ( ) { java . io . InputStream is = new java . io . ByteArrayInputStream ( new byte [ ] { } ) ; java . util . List < java . lang . String > actual = org . junithelper . core . util . IOUtil . readAsLineList ( is ) ; java . util . List < java . lang . String > expected = java . util . Arrays . asList ( new java . lang . String [ ] { } ) ; "<AssertPlaceHolder>" ; } readAsLineList ( java . io . InputStream ) { java . util . List < java . lang . String > dest = new java . util . ArrayList < java . lang . String > ( ) ; java . io . BufferedReader br = null ; try { br = new java . io . BufferedReader ( new java . io . InputStreamReader ( is ) ) ; java . lang . String line = null ; while ( ( line = br . readLine ( ) ) != null ) { dest . add ( line ) ; } return dest ; } finally { org . apache . commons . io . IOUtils . closeQuietly ( br ) ; } }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
testCurrentUserLoginId ( ) { java . lang . String expectedLoginId = "rangerAdmin" ; gjUser . setLoginId ( "rangerAdmin" ) ; java . lang . String loginId = contextUtil . getCurrentUserLoginId ( ) ; "<AssertPlaceHolder>" ; } getCurrentUserLoginId ( ) { org . apache . ranger . security . context . RangerSecurityContext context = org . apache . ranger . security . context . RangerContextHolder . getSecurityContext ( ) ; if ( context != null ) { org . apache . ranger . common . UserSessionBase userSession = context . getUserSession ( ) ; if ( userSession != null ) { return userSession . getLoginId ( ) ; } } return null ; }
org . junit . Assert . assertEquals ( expectedLoginId , loginId )
testImageMosaicConfigurationAliased ( ) { java . lang . Boolean configurationAliasRegistered = false ; java . lang . Class configurationClass = it . geosolutions . geobatch . imagemosaic . ImageMosaicConfiguration . class ; java . util . Iterator < java . util . Map . Entry < java . lang . String , java . lang . Class < ? > > > it = aliasRegistry . iterator ( ) ; while ( it . hasNext ( ) ) { java . util . Map . Entry < java . lang . String , java . lang . Class < ? > > alias = it . next ( ) ; it . geosolutions . geobatch . annotations . Action action = ( ( it . geosolutions . geobatch . annotations . Action ) ( it . geosolutions . geobatch . imagemosaic . ImageMosaicAction . class . getAnnotations ( ) [ 0 ] ) ) ; java . lang . String configurationAlias = action . configurationAlias ( ) ; if ( ( configurationAlias == null ) || ( configurationAlias . isEmpty ( ) ) ) { configurationAlias = configurationClass . getSimpleName ( ) ; } if ( ( alias . getKey ( ) . equals ( configurationAlias ) ) && ( alias . getValue ( ) . equals ( configurationClass ) ) ) { configurationAliasRegistered = true ; break ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } if ( ( it . geosolutions . geobatch . flow . event . generator . file . FileBasedEventGenerator . getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } it . geosolutions . geobatch . flow . event . generator . file . FileBasedEventGenerator < it . geosolutions . filesystemmonitor . monitor . FileSystemEvent > other = null ; if ( obj instanceof it . geosolutions . geobatch . flow . event . generator . file . FileBasedEventGenerator ) { other = ( ( it . geosolutions . geobatch . flow . event . generator . file . FileBasedEventGenerator ) ( obj ) ) ; } else { throw new java . lang . IllegalArgumentException ( "The<sp>object<sp>is<sp>not<sp>a<sp>FileBasedEventGenerator." ) ; } if ( ( fsMonitor ) == null ) { if ( ( other . fsMonitor ) != null ) { return false ; } } else if ( ! ( fsMonitor . equals ( other . fsMonitor ) ) ) { return false ; } if ( ( watchDirectory ) == null ) { if ( ( other . watchDirectory ) != null ) { return false ; } } else if ( ! ( watchDirectory . equals ( other . watchDirectory ) ) ) { return false ; } if ( ( wildCard ) == null ) { if ( ( other . wildCard ) != null ) { return false ; } } else if ( ! ( wildCard . equals ( other . wildCard ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( configurationAliasRegistered )
shouldRememberResourcesAfterLazilyLoading ( ) { "<AssertPlaceHolder>" ; } getResources ( ) { org . junit . Assert . assertNotNull ( context . obtainStyledAttributes ( new int [ ] { } ) . getResources ( ) ) ; }
org . junit . Assert . assertSame ( context . getResources ( ) , context . getResources ( ) )
testZoekIdsPersoonMetBsn ( ) { final java . lang . String bsn = "402533928" ; final java . util . List < java . lang . Long > persoonIds = geefDetailsPersoonRepository . zoekIdsPersoonMetBsn ( bsn ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , persoonIds . size ( ) )
whenConcatenatingHashFunction_concatenatedHashShouldBeReturned ( ) { int inputData = 15 ; com . google . common . hash . HashFunction hashFunction = com . google . common . hash . Hashing . concatenating ( com . google . common . hash . Hashing . crc32 ( ) , com . google . common . hash . Hashing . crc32 ( ) ) ; com . google . common . hash . HashFunction crc32Function = com . google . common . hash . Hashing . crc32 ( ) ; com . google . common . hash . HashCode hashCode = hashFunction . hashInt ( inputData ) ; com . google . common . hash . HashCode crc32HashCode = crc32Function . hashInt ( inputData ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( "Movie<sp>[imdbId=" + ( imdbId ) ) + ",<sp>director=" ) + ( director ) ) + ",<sp>actors=" ) + ( actors ) ) + "]" ; }
org . junit . Assert . assertEquals ( ( ( crc32HashCode . toString ( ) ) + ( crc32HashCode . toString ( ) ) ) , hashCode . toString ( ) )
test_getFontMetrics ( ) { org . eclipse . swt . graphics . FontMetrics fm = gc . getFontMetrics ( ) ; "<AssertPlaceHolder>" ; } getHeight ( ) { int defaultLineHeight = getLineHeight ( ) ; if ( styledText . isFixedLineHeight ( ) ) { return ( ( ( lineCount ) * defaultLineHeight ) + ( styledText . topMargin ) ) + ( styledText . bottomMargin ) ; } int totalHeight = 0 ; int width = styledText . getWrapWidth ( ) ; for ( int i = 0 ; i < ( lineCount ) ; i ++ ) { org . eclipse . swt . custom . StyledTextRenderer . LineSizeInfo line = getLineSize ( i ) ; int height = line . height ; if ( line . needsRecalculateHeight ( ) ) { if ( width > 0 ) { int length = content . getLine ( i ) . length ( ) ; height = ( ( ( length * ( averageCharWidth ) ) / width ) + 1 ) * defaultLineHeight ; } else { height = defaultLineHeight ; } } totalHeight += height ; } return ( totalHeight + ( styledText . topMargin ) ) + ( styledText . bottomMargin ) ; }
org . junit . Assert . assertTrue ( ( ( fm . getHeight ( ) ) > 0 ) )
testGetNextFormula ( ) { org . openscience . cdk . config . IsotopeFactory ifac = org . openscience . cdk . config . Isotopes . getInstance ( ) ; org . openscience . cdk . interfaces . IIsotope c = ifac . getMajorIsotope ( "C" ) ; org . openscience . cdk . interfaces . IIsotope h = ifac . getMajorIsotope ( "H" ) ; org . openscience . cdk . interfaces . IIsotope n = ifac . getMajorIsotope ( "N" ) ; org . openscience . cdk . interfaces . IIsotope o = ifac . getMajorIsotope ( "O" ) ; org . openscience . cdk . formula . MolecularFormulaRange mfRange = new org . openscience . cdk . formula . MolecularFormulaRange ( ) ; mfRange . addIsotope ( c , 0 , 10 ) ; mfRange . addIsotope ( h , 0 , 10 ) ; mfRange . addIsotope ( o , 0 , 10 ) ; mfRange . addIsotope ( n , 0 , 10 ) ; double minMass = 100.0 ; double maxMass = 100.05 ; org . openscience . cdk . formula . MolecularFormulaGenerator gen = new org . openscience . cdk . formula . MolecularFormulaGenerator ( builder , minMass , maxMass , mfRange ) ; org . openscience . cdk . interfaces . IMolecularFormula f = gen . getNextFormula ( ) ; "<AssertPlaceHolder>" ; } getNextFormula ( ) { if ( ( ! ( done ) ) && ( decomposer . next ( ) ) ) { this . lastDecomposition = decomposer . getCurrentCompomere ( ) ; return decomposer . generateCurrentMolecularFormula ( builder ) ; } else { done = true ; return null ; } }
org . junit . Assert . assertNotNull ( f )
testDeleteAuditTaskInfoLogByProcessIdAndNotMatchingDate ( ) { int p = 0 ; java . lang . String processId = taskTestData [ ( p ++ ) ] . getTaskData ( ) . getProcessId ( ) ; java . util . Date endDate = taskTestData [ ( p ++ ) ] . getTaskData ( ) . getCreatedOn ( ) ; org . kie . internal . task . query . AuditTaskDeleteBuilder updateBuilder = this . auditTaskDelete ( ) . date ( endDate ) . processId ( processId ) ; int result = updateBuilder . build ( ) . execute ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return new org . kie . internal . query . ParametrizedQuery < org . kie . api . task . model . TaskSummary > ( ) { private org . jbpm . query . jpa . data . QueryWhere queryWhere = new org . jbpm . query . jpa . data . QueryWhere ( getQueryWhere ( ) ) ; @ org . jbpm . services . task . impl . Override public java . util . List < org . kie . api . task . model . TaskSummary > getResultList ( ) { org . jbpm . services . task . commands . TaskSummaryQueryCommand cmd = new org . jbpm . services . task . commands . TaskSummaryQueryCommand ( queryWhere ) ; cmd . setUserId ( userId ) ; return executor . execute ( cmd ) ; } } ; }
org . junit . Assert . assertEquals ( 0 , result )
testConstructorFileName ( ) { java . lang . String expectedFileName = "some<sp>file<sp>name" ; de . metanome . backend . results_db . FileInput actualFileInput = new de . metanome . backend . results_db . FileInput ( expectedFileName ) ; "<AssertPlaceHolder>" ; checkDefaultParserSettings ( actualFileInput ) ; } getFileName ( ) { return fileName ; }
org . junit . Assert . assertEquals ( expectedFileName , actualFileInput . getFileName ( ) )
testRetrieveFromCache_withInvalidInput ( ) { final com . valkryst . VTerminal . misc . ImageCache cache = new com . valkryst . VTerminal . misc . ImageCache ( font ) ; final java . awt . Image image = cache . retrieve ( new com . valkryst . VTerminal . Tile ( '὞' ) ) ; "<AssertPlaceHolder>" ; } retrieve ( com . valkryst . VTerminal . Tile ) { final int hash = tile . getCacheHash ( ) ; java . awt . image . VolatileImage image = cachedImages . getIfPresent ( hash ) ; if ( ( image == null ) || ( image . contentsLost ( ) ) ) { image = loadIntoCache ( tile ) ; } return image ; }
org . junit . Assert . assertNotNull ( image )
testAddNullAsString ( ) { com . eclipsesource . v8 . V8Object object = new com . eclipsesource . v8 . V8Object ( v8 ) ; object . add ( "foo" , ( ( java . lang . String ) ( null ) ) ) ; "<AssertPlaceHolder>" ; object . close ( ) ; } getObject ( java . lang . String ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertNull ( object . getObject ( "foo" ) )
testSetExpanded_ChangedFocusItem ( ) { org . eclipse . nebula . widgets . grid . GridItem [ ] items = org . eclipse . nebula . widgets . grid . GridTestUtil . createGridItems ( grid , 1 , 1 ) ; items [ 0 ] . setExpanded ( true ) ; grid . setFocusItem ( items [ 1 ] ) ; items [ 0 ] . setExpanded ( false ) ; "<AssertPlaceHolder>" ; } getFocusItem ( ) { checkWidget ( ) ; return focusItem ; }
org . junit . Assert . assertSame ( items [ 0 ] , grid . getFocusItem ( ) )